Skip to content

Commit f2120c9

Browse files
committed
address comments + update readme with usage policy
1 parent 25504f3 commit f2120c9

File tree

3 files changed

+24
-37
lines changed

3 files changed

+24
-37
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
This package provides OpenTelemetry integration for smithy-swift clients. It bridges the Smithy telemetry API with the OpenTelemetry Swift SDK, allowing you to export traces and metrics.
44

5+
## Usage Policy Disclaimer
6+
7+
This project is currently in-development and not yet ready for use.
8+
59
### Features
610

711
- OpenTelemetry tracer provider implementation

Tests/SmithyOpenTelemetryTests/OTelProviderTests.swift

Lines changed: 0 additions & 33 deletions
This file was deleted.

Tests/SmithyOpenTelemetryTests/OTelUtilsTests.swift

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,26 @@ final class OTelUtilsTests: XCTestCase {
125125
let otelAttributes = attributes.toOtelAttributes()
126126

127127
XCTAssertEqual(otelAttributes.count, 4)
128-
XCTAssertNotNil(otelAttributes["string-key"])
129-
XCTAssertNotNil(otelAttributes["int-key"])
130-
XCTAssertNotNil(otelAttributes["bool-key"])
131-
XCTAssertNotNil(otelAttributes["double-key"])
128+
129+
guard case .string(let stringValue) = otelAttributes["string-key"] else {
130+
return XCTFail("Expected string attribute")
131+
}
132+
XCTAssertEqual(stringValue, "value")
133+
134+
guard case .int(let intValue) = otelAttributes["int-key"] else {
135+
return XCTFail("Expected int attribute")
136+
}
137+
XCTAssertEqual(intValue, 100)
138+
139+
guard case .bool(let boolValue) = otelAttributes["bool-key"] else {
140+
return XCTFail("Expected bool attribute")
141+
}
142+
XCTAssertFalse(boolValue)
143+
144+
guard case .double(let doubleValue) = otelAttributes["double-key"] else {
145+
return XCTFail("Expected double attribute")
146+
}
147+
XCTAssertEqual(doubleValue, 2.71, accuracy: 0.001)
132148
}
133149
}
134150
#endif

0 commit comments

Comments
 (0)