Skip to content

Commit 613b64d

Browse files
aldoKelviantoIgnacio Bonafonte
andauthored
Fix various typos in Api and Sdk sources (#515)
Co-authored-by: Ignacio Bonafonte <[email protected]>
1 parent 297d91f commit 613b64d

37 files changed

+64
-64
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()

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 }

Sources/Exporters/OpenTelemetryProtocolCommon/metric/MetricsAdapter.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import OpenTelemetrySdk
88

99
public enum MetricsAdapter {
1010
public static func toProtoResourceMetrics(stableMetricData: [StableMetricData]) -> [Opentelemetry_Proto_Metrics_V1_ResourceMetrics] {
11-
let resourceAndScopeMap = groupByResouceAndScope(stableMetricData: stableMetricData)
11+
let resourceAndScopeMap = groupByResourceAndScope(stableMetricData: stableMetricData)
1212

1313
var resourceMetrics = [Opentelemetry_Proto_Metrics_V1_ResourceMetrics]()
1414
resourceAndScopeMap.forEach { resMap in
@@ -31,7 +31,7 @@ public enum MetricsAdapter {
3131
}
3232

3333
public static func toProtoResourceMetrics(metricDataList: [Metric]) -> [Opentelemetry_Proto_Metrics_V1_ResourceMetrics] {
34-
let resourceAndScopeMap = groupByResouceAndScope(metricDataList: metricDataList)
34+
let resourceAndScopeMap = groupByResourceAndScope(metricDataList: metricDataList)
3535
var resourceMetrics = [Opentelemetry_Proto_Metrics_V1_ResourceMetrics]()
3636

3737
resourceAndScopeMap.forEach { resMap in
@@ -55,7 +55,7 @@ public enum MetricsAdapter {
5555
return resourceMetrics
5656
}
5757

58-
private static func groupByResouceAndScope(stableMetricData: [StableMetricData]) -> [Resource: [InstrumentationScopeInfo: [Opentelemetry_Proto_Metrics_V1_Metric]]] {
58+
private static func groupByResourceAndScope(stableMetricData: [StableMetricData]) -> [Resource: [InstrumentationScopeInfo: [Opentelemetry_Proto_Metrics_V1_Metric]]] {
5959
var results = [Resource: [InstrumentationScopeInfo: [Opentelemetry_Proto_Metrics_V1_Metric]]]()
6060

6161
stableMetricData.forEach {
@@ -66,7 +66,7 @@ public enum MetricsAdapter {
6666
return results
6767
}
6868

69-
private static func groupByResouceAndScope(metricDataList: [Metric]) -> [Resource: [InstrumentationScopeInfo: [Opentelemetry_Proto_Metrics_V1_Metric]]] {
69+
private static func groupByResourceAndScope(metricDataList: [Metric]) -> [Resource: [InstrumentationScopeInfo: [Opentelemetry_Proto_Metrics_V1_Metric]]] {
7070
var results = [Resource: [InstrumentationScopeInfo: [Opentelemetry_Proto_Metrics_V1_Metric]]]()
7171

7272
metricDataList.forEach {

Sources/Exporters/Persistence/Export/DataExportStatus.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import Foundation
88
/// The status of a single export attempt.
99
internal struct DataExportStatus {
1010
/// If export needs to be retried (`true`) because its associated data was not delivered but it may succeed
11-
/// in the next attempt (i.e. it failed due to device leaving signal range or a temporary server unavailability occured).
11+
/// in the next attempt (i.e. it failed due to device leaving signal range or a temporary server unavailability occurred).
1212
/// If set to `false` then data associated with the upload should be deleted as it does not need any more export
1313
/// attempts (i.e. the upload succeeded or failed due to unrecoverable client error).
1414
let needsRetry: Bool

0 commit comments

Comments
 (0)