Skip to content

Commit daa2fd4

Browse files
authored
Merge pull request #1 from open-telemetry/main
Repo update from upstream.
2 parents fc77806 + 613b64d commit daa2fd4

File tree

84 files changed

+1552
-786
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1552
-786
lines changed

Examples/Datadog Sample/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
This example shows the Datadog exporter used with a Simple Exporter, showing how to configure for sending.
44

5-
User must write the clientKey for Datadog at the begining of code.
5+
User must write the clientKey for Datadog at the beginning of code.
66

77

Examples/Simple Exporter/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ let instrumentationScopeName = "SimpleExporter"
2121
let instrumentationScopeVersion = "semver:0.1.0"
2222

2323
var tracer: TracerSdk
24-
let jaegerCollectorAdress = "localhost"
25-
let jaegerExporter = JaegerSpanExporter(serviceName: "SimpleExporter", collectorAddress: jaegerCollectorAdress)
24+
let jaegerCollectorAddress = "localhost"
25+
let jaegerExporter = JaegerSpanExporter(serviceName: "SimpleExporter", collectorAddress: jaegerCollectorAddress)
2626
let stdoutExporter = StdoutExporter()
2727

2828
// let zipkinExporterOptions = ZipkinTraceExporterOptions()

Package.resolved

Lines changed: 119 additions & 130 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package@swift-5.9.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ let package = Package(
4242
.package(url: "https://github.com/apple/swift-protobuf.git", from: "1.20.2"),
4343
.package(url: "https://github.com/apple/swift-log.git", from: "1.4.4"),
4444
.package(url: "https://github.com/apple/swift-metrics.git", from: "2.1.1"),
45-
.package(url: "https://github.com/ashleymills/Reachability.swift", from: "5.1.0")
4645
],
4746
targets: [
4847
.target(name: "OpenTelemetryApi",
@@ -60,7 +59,6 @@ let package = Package(
6059
.target(name: "NetworkStatus",
6160
dependencies: [
6261
"OpenTelemetryApi",
63-
.product(name: "Reachability", package: "Reachability.swift", condition: .when(platforms: [.iOS, .macOS, .tvOS, .macCatalyst, .linux]))
6462
],
6563
path: "Sources/Instrumentation/NetworkStatus",
6664
linkerSettings: [.linkedFramework("CoreTelephony", .when(platforms: [.iOS], configuration: nil))]),
@@ -124,7 +122,6 @@ let package = Package(
124122
.testTarget(name: "NetworkStatusTests",
125123
dependencies: [
126124
"NetworkStatus",
127-
.product(name: "Reachability", package: "Reachability.swift", condition: .when(platforms: [.iOS, .macOS, .tvOS, .macCatalyst, .linux]))
128125
],
129126
path: "Tests/InstrumentationTests/NetworkStatusTests"),
130127
.testTarget(name: "OpenTelemetryApiTests",

Sources/Exporters/DatadogExporter/ExporterConfiguration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public struct ExporterConfiguration {
2626
var payloadCompression: Bool
2727

2828
var source: String
29-
/// This conditon will be evaluated before trying to upload data
29+
/// This condition will be evaluated before trying to upload data
3030
/// Can be used to avoid reporting when no connection
3131
var uploadCondition: () -> Bool
3232
/// Performance preset for reporting

Sources/Exporters/DatadogExporter/Logs/LogEncoder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ internal struct DDLog: Encodable {
7777
self.environment = configuration.environment
7878
self.loggerName = attributes.removeValue(forKey: "loggerName")?.description ?? "logger"
7979
self.loggerVersion = "1.0" // loggerVersion
80-
self.threadName = attributes.removeValue(forKey: "threadName")?.description ?? "unkown"
80+
self.threadName = attributes.removeValue(forKey: "threadName")?.description ?? "unknown"
8181
self.applicationVersion = configuration.version
8282

8383
let userAttributes: [String: Encodable] = attributes.mapValues {

Sources/Exporters/DatadogExporter/Logs/LogSanitizer.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ internal struct LogSanitizer {
2424
/// Allowed first character of a tag name (given as ASCII values ranging from lowercased `a` to `z`) .
2525
/// Tags with name starting with different character will be dropped.
2626
static let allowedTagNameFirstCharacterASCIIRange: [UInt8] = Array(97 ... 122)
27-
/// Maximum lenght of the tag.
28-
/// Tags exceeting this lenght will be trunkated.
27+
/// Maximum length of the tag.
28+
/// Tags exceeting this length will be trunkated.
2929
static let maxTagLength: Int = 200
3030
/// Tag keys reserved for Datadog.
3131
/// If any of those is used by user, the tag will be ignored.

Sources/Exporters/DatadogExporter/Persistence/FileWriter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import Foundation
77

88
internal final class FileWriter {
9-
/// Data writting format.
9+
/// Data writing format.
1010
private let dataFormat: DataFormat
1111
/// Orchestrator producing reference to writable file.
1212
private let orchestrator: FilesOrchestrator

Sources/Exporters/DatadogExporter/Upload/DataUploadStatus.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ private enum HTTPResponseStatusCode: Int {
4747
/// The status of a single upload attempt.
4848
internal struct DataUploadStatus {
4949
/// If upload needs to be retried (`true`) because its associated data was not delivered but it may succeed
50-
/// in the next attempt (i.e. it failed due to device leaving signal range or a temporary server unavailability occured).
50+
/// in the next attempt (i.e. it failed due to device leaving signal range or a temporary server unavailability occurred).
5151
/// If set to `false` then data associated with the upload should be deleted as it does not need any more upload
5252
/// attempts (i.e. the upload succeeded or failed due to unrecoverable client error).
5353
let needsRetry: Bool

Sources/Exporters/DatadogExporter/Utils/PerformancePreset.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ internal protocol UploadPerformancePreset {
4040
/// At runtime, the upload interval ranges from `minUploadDelay` to `maxUploadDelay` depending
4141
/// on delivery success or failure.
4242
var defaultUploadDelay: TimeInterval { get }
43-
/// Mininum interval of data upload (in seconds).
43+
/// Minimum interval of data upload (in seconds).
4444
var minUploadDelay: TimeInterval { get }
4545
/// Maximum interval of data upload (in seconds).
4646
var maxUploadDelay: TimeInterval { get }

0 commit comments

Comments
 (0)