-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
If I create a brand new SwiftUI app with Xcode, and initialize Embrace SDK 6.15.1 the following way, using opentelemetry-swift 2.2.1, both from SwiftPM:
import EmbraceIO
import OpenTelemetryProtocolExporterCommon
import OpenTelemetryProtocolExporterHttp
import SwiftUI
@main
struct swiftui_ios_sandboxApp: App {
init() {
do {
let otelConfig = OtlpConfiguration(
exportAsJson: false
)
let otel = OpenTelemetryExport(
spanExporter: OtlpHttpTraceExporter(
endpoint: URL(string: "https://opentelemetry.my-company.com/v1/traces")!,
config: otelConfig
),
logExporter: OtlpHttpLogExporter(
endpoint: URL(string: "https://opentelemetry.my-company.com/v1/logs")!,
config: otelConfig
)
)
let embrace = try Embrace.setup(options: Embrace.Options(export: otel)).start()
} catch let e {
print("Error starting Embrace \(e.localizedDescription)")
}
}
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
I get a crash on launch at this line:
with the error message Fatal error: Negative value is not representable
It seems to me that the problem is that the hydrateSpan function at
embrace-apple-sdk/Sources/EmbraceOTelInternal/Trace/Tracer/Span/Processor/EmbraceSpanProcessor.swift
Line 211 in 2d10aff
| attributes[SpanSemantics.keySessionId] = .string(sessionId) |
totalAttributeCountReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels