{"id":13995151,"url":"https://github.com/open-telemetry/opentelemetry-swift","last_synced_at":"2025-04-07T21:08:38.732Z","repository":{"id":37784254,"uuid":"241558713","full_name":"open-telemetry/opentelemetry-swift","owner":"open-telemetry","description":"OpenTelemetry API for Swift","archived":false,"fork":false,"pushed_at":"2025-03-24T16:39:28.000Z","size":4184,"stargazers_count":257,"open_issues_count":114,"forks_count":168,"subscribers_count":21,"default_branch":"main","last_synced_at":"2025-03-31T20:05:22.457Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://opentelemetry.io/docs/instrumentation/swift/","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/open-telemetry.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-19T07:24:42.000Z","updated_at":"2025-03-29T07:28:43.000Z","dependencies_parsed_at":"2023-10-27T00:26:17.900Z","dependency_job_id":"b141c8e5-68a6-477e-9c59-4dfe61889cab","html_url":"https://github.com/open-telemetry/opentelemetry-swift","commit_stats":{"total_commits":566,"total_committers":53,"mean_commits":"10.679245283018869","dds":0.6519434628975265,"last_synced_commit":"a0261facbc0cada5fa796fc48c8f0ec821f2c000"},"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-telemetry%2Fopentelemetry-swift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-telemetry%2Fopentelemetry-swift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-telemetry%2Fopentelemetry-swift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-telemetry%2Fopentelemetry-swift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/open-telemetry","download_url":"https://codeload.github.com/open-telemetry/opentelemetry-swift/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247730068,"owners_count":20986404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-09T14:03:16.573Z","updated_at":"2025-04-07T21:08:38.714Z","avatar_url":"https://github.com/open-telemetry.png","language":"Swift","funding_links":[],"categories":["Swift"],"sub_categories":[],"readme":"# \u003cimg src=\"https://opentelemetry.io/img/logos/opentelemetry-logo-nav.png\" alt=\"OpenTelemetry Icon\" width=\"45\" height=\"\"\u003e opentelemetry-swift\n\n[![CI](https://github.com/open-telemetry/opentelemetry-swift/actions/workflows/BuildAndTest.yml/badge.svg)](https://github.com/open-telemetry/opentelemetry-swift/actions/workflows/BuildAndTest.yml?query=branch%3Amain+)\n[![codecov](https://codecov.io/gh/open-telemetry/opentelemetry-swift/branch/master/graph/badge.svg)](https://codecov.io/gh/open-telemetry/opentelemetry-swift)\n\n## About\n\nThe repository contains the Swift [OpenTelemetry](https://opentelemetry.io/) client\n\n## Getting Started\n\nThis package includes several libraries. The `OpenTelemetryApi` library includes protocols and no-op implementations that comprise the OpenTelemetry API following the [specification](https://github.com/open-telemetry/opentelemetry-specification). The `OpenTelemetrySdk` library is the reference implementation of the API.\n\nLibraries that produce telemetry data should only depend on `OpenTelemetryApi`, and defer the choice of the SDK to the application developer. Applications may depend on `OpenTelemetrySdk` or another package that implements the API.\n\n### Adding the dependency\n\nopentelemetry-swift is designed for Swift 5. To depend on the  opentelemetry-swift package, you need to declare your dependency in your `Package.swift`:\n\n```swift\n.package(url: \"https://github.com/open-telemetry/opentelemetry-swift\", from: \"1.0.0\"),\n```\n\nand to your application/library target, add `OpenTelemetryApi` or  `OpenTelemetrySdk`to your `dependencies`, e.g. like this:\n\n```swift\n.target(name: \"ExampleTelemetryProducerApp\", dependencies: [\"OpenTelemetryApi\"]),\n```\n\nor\n\n```swift\n.target(name: \"ExampleApp\", dependencies: [\"OpenTelemetrySdk\"]),\n```\n\n### Cocoapods\n\nAs of version 1.11.0, OpenTelemetry-Swift support cocoapods. \nTwo pods are provided: \n\n- `OpenTelemetry-Swift-Api`\n\n- `OpenTelemetry-Swift-Sdk`\n\n`OpenTelemetry-Swift-Api` is a dependency of `OpenTelemetry-Swift-Sdk`. \n\nMost users will want to add the following to their pod file:\n\n`pod 'OpenTelemetry-Swift-Sdk'`\n\nThis will add both the API and SDK. If you're only interesting in Adding the API add the following: \n\n`pod 'OpenTelemetry-Swift-Api'`\n\n## Documentation\n\nOfficial documentation for the library can be found in the official opentelemetry [documentation  page](https://opentelemetry.io/docs/instrumentation/swift/), including:\n\n* Documentation about installation and [manual instrumentation](https://opentelemetry.io/docs/instrumentation/swift/manual/)\n\n* [Libraries](https://opentelemetry.io/docs/instrumentation/swift/libraries/) that provide automatic instrumentation\n\n## Current status\n\n### API and SDK\n\nTracing and Baggage are considered stable\n\nLogs are considered beta quality\n\nMetrics is implemented using an outdated spec, is fully functional but will change in the future\n\n### Supported exporters and importers\n\n#### Traces\n\n* Exporters: Stdout, Jaeger, Zipkin, Datadog and OpenTelemetry (OTLP) collector\n* Importers: OpenTracingShim\n\n#### Metrics\n\n* Exporters: Prometheus, Datadog, and OpenTelemetry (OTLP) collector\n* Importers: SwiftMetricsShim\n\n#### Logs\n\n* Exporters: OpenTelemetry (OTLP) collector\n\n\u003e **_NOTE:_** OTLP exporters are supported both in GRPC and HTTP, only GRPC is production ready, HTTP is still experimental\n\n### Instrumentation libraries\n\n* `URLSession`\n* `NetworkStatus`\n* `SDKResourceExtension`\n* `SignPostIntegration`\n\n## Examples\n\nThe package includes some example projects with basic functionality:\n\n* `Datadog Sample` -  Shows the Datadog exporter used with a Simple Exporter, showing how to configure for sending.\n* `Logging Tracer` -  Simple api implementation of a Tracer that logs every api call\n* `Network Tracer` -  Shows how to use the `URLSessionInstrumentation` instrumentation in your application\n* `Simple Exporter` - Shows the Jaeger an Stdout exporters in action using a MultiSpanExporter. Can be easily modified for other exporters\n* `Prometheus Sample` - Shows the Prometheus exporter reporting metrics to a Prometheus instance\n* `OTLP Exporter` - Shows the OTLP exporter reporting traces to Zipkin and metrics to a Prometheus via the otel-collector\n\n## Contributing\nWe'd love your help!. Use tags [help wanted][help wanted] and\n[good first issue][good first issues] to get started with the project. \nFor an overview of how to contribute, see the contributing guide in [CONTRIBUTING.md](CONTRIBUTING.md).\n\nWe have a weekly SIG meeting! See the [community page](https://github.com/open-telemetry/community#swift-sdk) for meeting details and notes.\n\nWe are also available in the [#otel-swift](https://cloud-native.slack.com/archives/C01NCHR19SB) channel in the [CNCF slack](https://slack.cncf.io/). Please join us there for OTel Swift discussions.\n\n### Community members\n\n#### Maintainers ([@open-telemetry/swift-maintainers](https://github.com/orgs/open-telemetry/teams/swift-maintainers))\n\n- [Ignacio Bonaforte](https://github.com/nachob), Independent\n- [Bryce Buchanan](https://github.com/bryce-b), Elastic\n\n*Find more about the maintainer role in the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#maintainer).*\n\n#### Approvers ([@open-telemetry/swift-approvers](https://github.com/orgs/open-telemetry/teams/swift-approvers))\n\n- [Vinod Vydier](https://github.com/vvydier)), Independent\n- [Austin Emmons](https://github.com/atreat), Embrace\n\n*Find more about the approver role in the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#approver).*\n\n#### Triager ([@open-telemetry/swift-triagers](https://github.com/orgs/open-telemetry/teams/swift-triagers))\n\n- [Alolita Sharma](https://github.com/alolita), Apple\n\n*Find more about the triager role in the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#triager).*\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-telemetry%2Fopentelemetry-swift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopen-telemetry%2Fopentelemetry-swift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-telemetry%2Fopentelemetry-swift/lists"}