Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.17.0 #2047

Merged
merged 139 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
139 commits
Select commit Hold shift + click to select a range
55891cc
RUM-5536 [SR] Add Start/stop APIs
mariedm Jul 5, 2024
31b8cca
RUM-5536 Address comments
mariedm Aug 9, 2024
1884ad8
RUM-5536 Add startRecordingImmediately to API parameters
mariedm Aug 9, 2024
5003898
RUM-5555 Collect memory metric
maxep Aug 7, 2024
5f2ced6
Update README.md
maxep Aug 13, 2024
121b2fd
Add docs
maxep Aug 13, 2024
203278e
RUM-5536 Address comments
mariedm Aug 14, 2024
4100ed3
RUM-5536 Fix test
mariedm Aug 14, 2024
8cfc521
Update README.md
maxep Aug 14, 2024
47e5e34
RUM-5555 Collect FPS metric
maxep Aug 14, 2024
6e84165
fix: Ensure need attributes are sent from logs on the message bus
fuzzybinary Aug 16, 2024
fe92a84
chore: Bump dd-swift-testing to recent version
ncreated Aug 14, 2024
dd0c191
chore: Export ENV variables for Test Visibility product
ncreated Aug 14, 2024
a82de5a
chore: Update schemes to forward Test Visibility ENVs to `dd-sdk-swif…
ncreated Aug 14, 2024
38e9955
chore: Enable Test Visibility for CI runs
ncreated Aug 14, 2024
56064dc
chore: Forward DD_GIT_REPOSITORY_URL to Test Visibility
ncreated Aug 19, 2024
53c2830
chore: Forward DD_GIT_BRANCH and DD_GIT_TAG to Test Visibility
ncreated Aug 19, 2024
11c8747
chore: Use Test Visibility in shadowed GitLab build
ncreated Aug 19, 2024
a5ec6e8
chore: Bump CI Test Visibility to `2.5.0-alpha3`
ncreated Aug 19, 2024
0c3a8fe
RUM-5752 Add UIKitCatalog
maxep Aug 19, 2024
5a2ee6f
Remove exporter base class
maxep Aug 19, 2024
a1efa80
chore: Cleanup ENVs in DatadogObjc xcscheme
ncreated Aug 19, 2024
92a2b0a
Use enum for scenarios
maxep Aug 19, 2024
28c564d
RUM-5752 Add License.txt
maxep Aug 19, 2024
71769c4
Apply CR review suggestions
maxep Aug 20, 2024
e9e4355
Merge pull request #1986 from DataDog/mariedm/feat/RUM-5536-start-sto…
mariedm Aug 20, 2024
6d875cc
Merge pull request #1993 from DataDog/maxep/RUM-5555/memory-metrics
maxep Aug 20, 2024
d0a2fec
Merge pull request #1995 from DataDog/maxep/RUM-5555/fps-metrics
maxep Aug 20, 2024
0a3f050
RUM-5555 Collect CPU usage
maxep Aug 14, 2024
58c1b4e
Update SyntheticRun doc
maxep Aug 20, 2024
9cb5f62
Fix build
maxep Aug 20, 2024
f427862
Merge pull request #1994 from DataDog/maxep/RUM-5555/cpu-metrics
maxep Aug 20, 2024
a7914f9
RUM-5555 Add job to build benchmarks runner
maxep Aug 20, 2024
4c91673
Merge pull request #2003 from DataDog/release/2.16.0
maxep Aug 20, 2024
16677de
Fix build
maxep Aug 20, 2024
9bdf3a5
chore: Export DD_TRACE_DEBUG and enhance CI env debugging
ncreated Aug 21, 2024
a1ff76a
RUM-5716 fix: propagate global Tracer tags to otel span attributes
ganeshnj Aug 19, 2024
90b4538
update changelog
ganeshnj Aug 19, 2024
411d969
RUM-3889 feat: Send retry information with network requests
ganeshnj Aug 14, 2024
5dd7d8c
fix test case
ganeshnj Aug 14, 2024
da08cbe
fix compile error
ganeshnj Aug 14, 2024
ddf1b88
fix linter
ganeshnj Aug 14, 2024
ff2eff0
fix SR test case
ganeshnj Aug 14, 2024
d0b0648
fix SR tests
ganeshnj Aug 14, 2024
bfbb258
rebase to develop
ganeshnj Aug 21, 2024
08a24b1
WIP
ncreated Aug 21, 2024
1a81e90
Fix UIColor bundle
maxep Aug 21, 2024
73f0fcb
chore: Pass GitLab envs to Test Visibility
ncreated Aug 21, 2024
7d8c177
chore: CR - pass CI provider ENVs to `dd-sdk-swift-testing`
ncreated Aug 21, 2024
5fa648b
chore: Bump `dd-sdk-swift-testing` to 2.5.0
ncreated Aug 21, 2024
475924e
Merge pull request #1991 from DataDog/ganeshnj/feat/retry-information
ganeshnj Aug 21, 2024
3b26b85
Merge branch 'develop' into ganeshnj/feat/otel-tracer-tag
ganeshnj Aug 21, 2024
93fd18c
Merge pull request #1999 from DataDog/ncreated/chore/ci-visibility-sh…
ncreated Aug 21, 2024
ae54573
Update Makefile
maxep Aug 21, 2024
2cafed9
Update .gitlab-ci.yml
maxep Aug 21, 2024
07953e3
Merge pull request #2000 from DataDog/ganeshnj/feat/otel-tracer-tag
ganeshnj Aug 21, 2024
7a57ec7
Merge pull request #1997 from DataDog/jward/cp-error-attributes
fuzzybinary Aug 21, 2024
a5bf5c0
RUM-4311: Add Logs event mapper to ObjC API
0xnm Aug 21, 2024
cc9a700
RUM-5083 Wrap metric telemetry attributes in `MetricTelemetry` type
ncreated Aug 22, 2024
b1929a4
Fix lazy image SR identifier
maciejburda Aug 22, 2024
691fc07
Merge pull request #2008 from DataDog/nogorodnikov/rum-4311/add-logs-…
0xnm Aug 22, 2024
56d239b
Always assume device is online on Apple Watch
jfiser-paylocity Aug 20, 2024
2c8246d
Update CHANGELOG.md
maxep Aug 21, 2024
0fc3cd0
RUM-5083 Add `sampleRate` to metric telemetry message
ncreated Aug 22, 2024
9728bc2
RUM-5083 Make all metric sample rates explicit
ncreated Aug 22, 2024
6a8fe68
RUM-5083 Update tests
ncreated Aug 22, 2024
4f39eaf
RUM-5083 chore: Lower Batch Metrics sample rate
ncreated Aug 23, 2024
aac0b49
Merge pull request #2013 from DataDog/maciey/fix-lazy-image-sridentifier
maciejburda Aug 23, 2024
7d112f1
Merge pull request #2001 from DataDog/maxep/RUM-5752/benchmark-sr-sce…
maxep Aug 23, 2024
d890f1d
Exclude BenchmarkTests/UIKitCatalog from license check
maxep Aug 23, 2024
8ab059e
Merge pull request #2017 from DataDog/maxep/fix/license-check
maxep Aug 23, 2024
da8666f
RUM-5755 Add benchmark profiler interface
maxep Aug 21, 2024
e485060
RUM-5755 Initialize otel tracer
maxep Aug 22, 2024
7733732
RUM-5083 CR feedback
ncreated Aug 23, 2024
0c2d3c0
fix: UIKitCatalog auto version
maxep Aug 23, 2024
1c19f1f
Merge pull request #2018 from DataDog/maxep/fix/benchmark-build
maxep Aug 23, 2024
8e1070f
RUM-5083 CR feedback: improve Method Called sample rate names
ncreated Aug 23, 2024
f7c164c
RUM-5083 Fix RUM tests not compiling
ncreated Aug 26, 2024
fb15873
Merge pull request #2009 from DataDog/jfiser-paylocity/bugfix/watchos…
maxep Aug 26, 2024
93c5d1e
Merge pull request #2006 from DataDog/maxep/RUM-5555/add-benchmark-job
maxep Aug 26, 2024
ec7dc75
fix: Update CURRENT_PROJECT_VERSION only
maxep Aug 26, 2024
aebf155
RUM-5732 chore: cleanup deprecated podspecs
ganeshnj Aug 19, 2024
614b5f4
Report CFBundleVersion in benchmarks
maxep Aug 26, 2024
18f53dc
Update Runner.xcscheme
maxep Aug 26, 2024
a3f77d1
Merge pull request #2021 from DataDog/maxep/fix/benchmark-upload
maxep Aug 26, 2024
2776cf4
Merge pull request #1998 from DataDog/ganeshnj/feat/drop-cp-specs
ganeshnj Aug 26, 2024
5859776
Replace BENCHMARK compilation flag by DD_BENCHMARK
maxep Aug 26, 2024
0193c1a
Apply CR suggestion
maxep Aug 26, 2024
6ab0df9
Merge pull request #2015 from DataDog/ncreated/RUM-5083/custom-metric…
ncreated Aug 26, 2024
296ed7b
Rename benchmarks enablement methods
maxep Aug 26, 2024
d840edc
Merge pull request #2016 from DataDog/ncreated/RUM-5083/batch-metric-…
ncreated Aug 26, 2024
1974d88
fix: remove retry information from Logs and Trace requests
ganeshnj Aug 27, 2024
652896d
fix test case
ganeshnj Aug 27, 2024
aa00823
fix integ tests
ganeshnj Aug 27, 2024
04cb964
fix integ tests
ganeshnj Aug 27, 2024
f58c9b1
RUM-4571 feat: add support for usage telemetry
ganeshnj Aug 26, 2024
c2e0457
Merge pull request #2024 from DataDog/ganeshnj/fix/remove-retry-info-…
ganeshnj Aug 27, 2024
37b1b90
Bundle update
maciejburda Aug 27, 2024
e49d5f0
RUM-5841 feat(view-loading-api): implement addViewLoadingTime API
ganeshnj Aug 27, 2024
dd44dce
Merge pull request #2014 from DataDog/maxep/RUM-5755/benchmak-profili…
maxep Aug 27, 2024
9cdcdac
fix spi error
ganeshnj Aug 27, 2024
e5a7b3e
Merge pull request #2025 from DataDog/maciey/rexml-vulnerability-fix
maciejburda Aug 27, 2024
341ba8b
RUM-5841 feat(view-loading-api): update changelog
ganeshnj Aug 28, 2024
7247af5
regenerate
ganeshnj Aug 28, 2024
5d1425d
refactor type skipping
ganeshnj Aug 28, 2024
27a55a4
cleanup
ganeshnj Aug 28, 2024
0b8f312
fix: Benchmark Upload
maxep Aug 29, 2024
8539ae9
Update DatadogRUM/Sources/RUMMonitorProtocol.swift
ganeshnj Aug 29, 2024
6b811e2
Update DatadogRUM/Sources/RUMMonitor/Scopes/RUMViewScope.swift
ganeshnj Aug 29, 2024
a6f034a
introduce missed event type
ganeshnj Aug 29, 2024
b2086fa
Merge pull request #2028 from DataDog/maxep/fix/benchmark-upload
maxep Aug 29, 2024
3da2bb2
feat: Improve metrics collected during benchmarks
maxep Aug 29, 2024
c93151b
Merge pull request #2019 from DataDog/ganeshnj/feat/usage-telemetry
ganeshnj Sep 2, 2024
654aba5
Merge pull request #2026 from DataDog/ganeshnj/feat/view-loading-api
ganeshnj Sep 2, 2024
8cbca94
Merge pull request #2031 from DataDog/maxep/improve-metrics
maxep Sep 2, 2024
d4df1c5
chore: Enable app launch timing on macOS, macCatalyst and visionOS
ncreated Sep 3, 2024
8d26db6
Merge pull request #2033 from DataDog/ncreated/merge-hengyu-enhance-m…
ncreated Sep 3, 2024
99d25c4
RUM-1053 Make public `DatadogLogs` API concurrency-safe
ncreated Sep 3, 2024
a2d7092
RUM-1053 Fix Swift concurrency warnings in Logs
ncreated Sep 4, 2024
bd37fb8
RUM-1053 Make `RemoteLogger` depend on `featureScope` not `core`
ncreated Sep 4, 2024
1691d07
RUM-1053 Remove `core` dependency from `RemoteLogger`
ncreated Sep 4, 2024
77235c6
gh-2032 chore: update TraceID docs to reflect the generation implemen…
ganeshnj Sep 4, 2024
6ae80cc
RUM-1053 Declare logger attributes as concurrency-safe
ncreated Sep 4, 2024
79470bc
RUM-1053 Declare logger tags as concurrency-safe
ncreated Sep 4, 2024
c8c1e79
RUM-1053 Declare `BacktraceReporter` as Sendable
ncreated Sep 4, 2024
a3d8423
RUM-1053 Fix lint; update concurrency in implicit types
ncreated Sep 4, 2024
9d43162
chore: Enable test visibility for regular unit test jobs (iOS + tvOS)
ncreated Sep 5, 2024
3ae4ef6
Merge pull request #2038 from DataDog/ncreated/chore/enable-test-visi…
ncreated Sep 6, 2024
55ded08
Merge pull request #2037 from DataDog/ganeshnj/docs/trace-id
ganeshnj Sep 6, 2024
69476c8
RUM-2491 Add debug screen to test RUM telemetry
ncreated Sep 6, 2024
ec940cb
RUM-2491 Fix properties encoding in rum-models-generator
ncreated Sep 9, 2024
562a1e8
RUM-2491 Re-generate RUM models after fix
ncreated Sep 9, 2024
76fdab4
Merge pull request #2035 from DataDog/ncreated/RUM-1053/make-logs-api…
ncreated Sep 10, 2024
66d0ad0
RUM-2491 CR feedback - reverse logic condition
ncreated Sep 10, 2024
c4abac2
Merge pull request #2042 from DataDog/ncreated/RUM-2491/fix-telemetry…
ncreated Sep 10, 2024
c1753a6
chore: Increase delay in publish "legacy" podspecs job
ncreated Sep 11, 2024
2381728
Merge pull request #2045 from DataDog/ncreated/chore/update-release-j…
ncreated Sep 11, 2024
9f4813a
Bumped version to 2.17.0
mariedm Sep 11, 2024
821a4df
Fix changelog
mariedm Sep 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
32 changes: 25 additions & 7 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,18 @@ default:
rules:
- if: '$CI_COMMIT_TAG || $RELEASE_GIT_TAG'

.release-pipeline-delayed-job:
.release-pipeline-20m-delayed-job:
rules:
- if: '$CI_COMMIT_TAG || $RELEASE_GIT_TAG'
when: delayed
start_in: 20 minutes

.release-pipeline-40m-delayed-job:
rules:
- if: '$CI_COMMIT_TAG || $RELEASE_GIT_TAG'
when: delayed
start_in: 40 minutes

ENV check:
stage: pre
rules:
Expand Down Expand Up @@ -96,7 +102,7 @@ Unit Tests (iOS):
script:
- ./tools/runner-setup.sh --xcode "$DEFAULT_XCODE"
- make clean repo-setup ENV=ci
- make test-ios-all OS="$DEFAULT_IOS_OS" PLATFORM="$PLATFORM" DEVICE="$DEVICE"
- make test-ios-all OS="$DEFAULT_IOS_OS" PLATFORM="$PLATFORM" DEVICE="$DEVICE" USE_TEST_VISIBILITY=1

Unit Tests (tvOS):
stage: test
Expand All @@ -109,7 +115,7 @@ Unit Tests (tvOS):
script:
- ./tools/runner-setup.sh --xcode "$DEFAULT_XCODE"
- make clean repo-setup ENV=ci
- make test-tvos-all OS="$DEFAULT_TVOS_OS" PLATFORM="$PLATFORM" DEVICE="$DEVICE"
- make test-tvos-all OS="$DEFAULT_TVOS_OS" PLATFORM="$PLATFORM" DEVICE="$DEVICE" USE_TEST_VISIBILITY=1

UI Tests:
stage: ui-test
Expand Down Expand Up @@ -164,6 +170,17 @@ Tools Tests:
- make clean repo-setup ENV=ci
- make tools-test

Benchmark Build:
stage: smoke-test
rules:
- if: '$CI_COMMIT_BRANCH' # when on branch with following changes compared to develop
changes:
paths:
- "BenchmarkTests/**/*"
compare_to: 'develop'
script:
- make benchmark-build

Smoke Tests (iOS):
stage: smoke-test
rules:
Expand Down Expand Up @@ -265,7 +282,7 @@ E2E Test (upload to s8s):
- ./tools/runner-setup.sh --xcode "$DEFAULT_XCODE" --datadog-ci
- make clean
- export DRY_RUN=${DRY_RUN:-0} # default to 0 if not specified
- make e2e-build-upload ARTIFACTS_PATH="artifacts/e2e"
- make e2e-upload ARTIFACTS_PATH="artifacts/e2e"

# ┌────────────────────────────┐
# │ Benchmark Test app upload: │
Expand All @@ -275,6 +292,7 @@ Benchmark Test (upload to s8s):
stage: benchmark-test
rules:
- if: '$CI_COMMIT_BRANCH == $DEVELOP_BRANCH'
allow_failure: true
artifacts:
paths:
- artifacts
Expand All @@ -283,7 +301,7 @@ Benchmark Test (upload to s8s):
- ./tools/runner-setup.sh --xcode "$DEFAULT_XCODE" --datadog-ci
- make clean
- export DRY_RUN=${DRY_RUN:-0} # default to 0 if not specified
- make benchmark-build-upload ARTIFACTS_PATH="artifacts/benchmark"
- make benchmark-upload ARTIFACTS_PATH="artifacts/benchmark"

# ┌─────────────────┐
# │ SDK dogfooding: │
Expand Down Expand Up @@ -363,7 +381,7 @@ Publish CP podspecs (internal):
Publish CP podspecs (dependent):
stage: release-publish
rules:
- !reference [.release-pipeline-delayed-job, rules]
- !reference [.release-pipeline-20m-delayed-job, rules]
before_script:
- *export_MAKE_release_params
script:
Expand All @@ -375,7 +393,7 @@ Publish CP podspecs (dependent):
Publish CP podspecs (legacy):
stage: release-publish
rules:
- !reference [.release-pipeline-delayed-job, rules]
- !reference [.release-pipeline-40m-delayed-job, rules]
before_script:
- *export_MAKE_release_params
script:
Expand Down
765 changes: 749 additions & 16 deletions BenchmarkTests/BenchmarkTests.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@
ReferencedContainer = "container:BenchmarkTests.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "BENCHMARK_RUN"
value = "instrumented"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "BENCHMARK_SCENARIO"
value = "sessionReplay"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
13 changes: 7 additions & 6 deletions BenchmarkTests/Benchmarks/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let package = Package(
products: [
.library(
name: "DatadogBenchmarks",
targets: ["Benchmarks"]
targets: ["DatadogBenchmarks"]
)
]
)
Expand All @@ -28,12 +28,13 @@ func addOpenTelemetryDependency(_ version: Version) {

package.targets = [
.target(
name: "Benchmarks",
name: "DatadogBenchmarks",
dependencies: [
.product(name: "OpenTelemetryApi", package: "opentelemetry-swift"),
.product(name: "OpenTelemetrySdk", package: "opentelemetry-swift")
.product(name: "OpenTelemetrySdk", package: "opentelemetry-swift"),
.product(name: "DatadogExporter", package: "opentelemetry-swift")
],
swiftSettings: [.unsafeFlags(["-DOTEL_SWIFT"])]
swiftSettings: [.define("OTEL_SWIFT")]
)
]

Expand All @@ -44,11 +45,11 @@ func addOpenTelemetryDependency(_ version: Version) {

package.targets = [
.target(
name: "Benchmarks",
name: "DatadogBenchmarks",
dependencies: [
.product(name: "OpenTelemetryApi", package: "opentelemetry-swift-packages")
],
swiftSettings: [.unsafeFlags(["-DOTEL_API"])]
swiftSettings: [.define("OTEL_API")]
)
]
}
Expand Down
171 changes: 171 additions & 0 deletions BenchmarkTests/Benchmarks/Sources/Benchmarks.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
/*
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2019-Present Datadog, Inc.
*/

#if OTEL_API
#error("Benchmarks depends on opentelemetry-swift. Please open the project with 'make benchmark-tests-open'.")
#endif

import Foundation
import OpenTelemetryApi
import OpenTelemetrySdk
import DatadogExporter

let instrumentationName = "benchmarks"
let instrumentationVersion = "1.0.0"

/// Benchmark entrypoint to configure opentelemetry with metrics meters
/// and tracer.
public enum Benchmarks {
/// Configuration of the Benchmarks library.
public struct Configuration {
/// Context of Benchmarks measures.
/// The context properties will be added to metrics as tags.
public struct Context {
var applicationIdentifier: String
var applicationName: String
var applicationVersion: String
var sdkVersion: String
var deviceModel: String
var osName: String
var osVersion: String
var run: String
var scenario: String
var branch: String

public init(
applicationIdentifier: String,
applicationName: String,
applicationVersion: String,
sdkVersion: String,
deviceModel: String,
osName: String,
osVersion: String,
run: String,
scenario: String,
branch: String
) {
self.applicationIdentifier = applicationIdentifier
self.applicationName = applicationName
self.applicationVersion = applicationVersion
self.sdkVersion = sdkVersion
self.deviceModel = deviceModel
self.osName = osName
self.osVersion = osVersion
self.run = run
self.scenario = scenario
self.branch = branch
}
}

var clientToken: String
var apiKey: String
var context: Context

public init(
clientToken: String,
apiKey: String,
context: Context
) {
self.clientToken = clientToken
self.apiKey = apiKey
self.context = context
}
}

/// Configure OpenTelemetry metrics meter and start measuring Memory.
///
/// - Parameter configuration: The Benchmark configuration.
public static func enableMetrics(with configuration: Configuration) {
let metricExporter = MetricExporter(
configuration: MetricExporter.Configuration(
apiKey: configuration.apiKey,
version: instrumentationVersion
)
)

let meterProvider = MeterProviderBuilder()
.with(pushInterval: 10)
.with(processor: MetricProcessorSdk())
.with(exporter: metricExporter)
.with(resource: Resource())
.build()

let meter = meterProvider.get(
instrumentationName: instrumentationName,
instrumentationVersion: instrumentationVersion
)

let labels = [
"device_model": configuration.context.deviceModel,
"os": configuration.context.osName,
"os_version": configuration.context.osVersion,
"run": configuration.context.run,
"scenario": configuration.context.scenario,
"application_id": configuration.context.applicationIdentifier,
"sdk_version": configuration.context.sdkVersion,
"branch": configuration.context.branch,
]

let queue = DispatchQueue(label: "com.datadoghq.benchmarks.metrics", qos: .utility)

let memory = Memory(queue: queue)
_ = meter.createDoubleObservableGauge(name: "ios.benchmark.memory") { metric in
// report the maximum memory footprint that was recorded during push interval
if let value = memory.aggregation?.max {
metric.observe(value: value, labels: labels)
}

memory.reset()
}

let cpu = CPU(queue: queue)
_ = meter.createDoubleObservableGauge(name: "ios.benchmark.cpu") { metric in
// report the average cpu usage that was recorded during push interval
if let value = cpu.aggregation?.avg {
metric.observe(value: value, labels: labels)
}

cpu.reset()
}

let fps = FPS()
_ = meter.createIntObservableGauge(name: "ios.benchmark.fps.min") { metric in
// report the minimum frame rate that was recorded during push interval
if let value = fps.aggregation?.min {
metric.observe(value: value, labels: labels)
}

fps.reset()
}

OpenTelemetry.registerMeterProvider(meterProvider: meterProvider)
}

/// Configure and register a OpenTelemetry Tracer.
///
/// - Parameter configuration: The Benchmark configuration.
public static func enableTracer(with configuration: Configuration) {
let exporterConfiguration = ExporterConfiguration(
serviceName: configuration.context.applicationIdentifier,
resource: "Benchmark Tracer",
applicationName: configuration.context.applicationName,
applicationVersion: configuration.context.applicationVersion,
environment: "benchmarks",
apiKey: configuration.apiKey,
endpoint: .us1,
uploadCondition: { true }
)

let exporter = try! DatadogExporter(config: exporterConfiguration)
let processor = SimpleSpanProcessor(spanExporter: exporter)

let provider = TracerProviderBuilder()
.add(spanProcessor: processor)
.build()

OpenTelemetry.registerTracerProvider(tracerProvider: provider)
}
}
46 changes: 0 additions & 46 deletions BenchmarkTests/Benchmarks/Sources/DatadogExporter.swift

This file was deleted.

Loading