Skip to content

Commit

Permalink
Merge pull request #485 from vvydier/main
Browse files Browse the repository at this point in the history
fixed the hard coding of sdk version
  • Loading branch information
bryce-b authored Nov 30, 2023
2 parents a7426e4 + 604c4a7 commit f9704c1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/OpenTelemetrySdk/Resources/Resource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public struct Resource: Equatable, Hashable, Codable {
self.init(attributes: [ResourceAttributes.serviceName.rawValue: AttributeValue.string("unknown_service:\(executableName)"),
ResourceAttributes.telemetrySdkName.rawValue: AttributeValue.string("opentelemetry"),
ResourceAttributes.telemetrySdkLanguage.rawValue: AttributeValue.string("swift"),
ResourceAttributes.telemetrySdkVersion.rawValue: AttributeValue.string("1.0.0")]
ResourceAttributes.telemetrySdkVersion.rawValue: AttributeValue.string(Resource.OTEL_SWIFT_SDK_VERSION)]
)
}

Expand Down
10 changes: 10 additions & 0 deletions Sources/OpenTelemetrySdk/Version.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
//

import Foundation

extension Resource {
public static let OTEL_SWIFT_SDK_VERSION : String = "1.8.0"
}

0 comments on commit f9704c1

Please sign in to comment.