{"id":28092549,"url":"https://github.com/callstack/react-native-open-telemetry","last_synced_at":"2025-06-18T19:34:09.683Z","repository":{"id":289705971,"uuid":"953924434","full_name":"callstack/react-native-open-telemetry","owner":"callstack","description":"Observability SDK for React Native","archived":false,"fork":false,"pushed_at":"2025-05-12T20:14:05.000Z","size":1671,"stargazers_count":14,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-13T13:19:46.506Z","etag":null,"topics":["open-telemetry","react-native"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/callstack.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-24T09:48:06.000Z","updated_at":"2025-05-12T20:14:07.000Z","dependencies_parsed_at":"2025-04-24T16:57:45.984Z","dependency_job_id":"9395bffb-7358-4888-b9b4-a497ca922c2c","html_url":"https://github.com/callstack/react-native-open-telemetry","commit_stats":null,"previous_names":["callstack/react-native-open-telemetry"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callstack%2Freact-native-open-telemetry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callstack%2Freact-native-open-telemetry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callstack%2Freact-native-open-telemetry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callstack%2Freact-native-open-telemetry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/callstack","download_url":"https://codeload.github.com/callstack/react-native-open-telemetry/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253948512,"owners_count":21988962,"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":["open-telemetry","react-native"],"created_at":"2025-05-13T13:19:51.520Z","updated_at":"2025-05-13T13:19:52.076Z","avatar_url":"https://github.com/callstack.png","language":"Kotlin","readme":"# react-native-open-telemetry\n\nBest in class observability brought to React Native.\n\n* **OpenTelemetry** is a collection of APIs, SDKs, and tools developed by [OpenTelemetry](https://github.com/open-telemetry) to instrument, generate, collect, and export telemetry data. See [What is OpenTelemetry](https://opentelemetry.io/docs/what-is-opentelemetry/) for more information.\n* **react-native-open-telemetry** is a library that allows you to easily use **OpenTelemetry's** JS and Native bindings inside your React Native app.\n\n## Features\n\n* **Telemetry without lock-in**. Send to **any OTLP compliant backend** including [vendors](https://opentelemetry.io/ecosystem/vendors/)\n* [**Tracing** API](https://opentelemetry.io/docs/specs/otel/trace/api/)\n* [**Metrics** API](https://opentelemetry.io/docs/specs/otel/metrics/api/)\n* **Web**, **Android** (experimental) support with **iOS** coming soon\n* Automatic **fetch instrumentation**\n* Automatic **session tagging**\n\n## Platform support\n\n| Platform | Support |\n| --- | --- |\n| **web** | ☑️ Stable |\n| **android** | ☑️ Stable JS with experimental Native 🏗️ |\n| **ios** | ☑️ Stable JS with planned Native 👀 |\n\n## Installation\n\n```sh\nnpm install react-native-open-telemetry\n```\n\n## Usage\n\n### 1. Start the JS SDK\n\nSee OpenTelemetry's JS documentation on [Traces](https://opentelemetry.io/docs/languages/js/instrumentation/#acquiring-a-tracer) and [Metrics](https://opentelemetry.io/docs/languages/js/instrumentation/#acquiring-a-meter) for more information on available APIs.\n\n```js\nimport { openTelemetrySDK } from 'react-native-open-telemetry';\n\n// Start the SDK\nconst sdk = openTelemetrySDK({\n  debug: true,\n  url: \"https://my-collector.com:4317\",\n  name: \"my-app\",\n  version: \"1.0.0-alpha\",\n  environment: \"development\",\n});\n\n// Use available APIs\nconst meter = sdk.metrics.getMeter(\"my-js-meter\", \"1.0\");\n\nconst promoCounter = meter.createCounter(\"my-promo-counter\", {\n  description: \"A counter metric for my promo section\"\n});\n\nfunction App() {\n  function onPress() {\n    promoCounter.add(1);\n  }\n\n  return \u003cButton title=\"Press me\" onPress={onPress} /\u003e\n}\n```\n\n### 2. Start the native SDK (optional) 🚧\n\n\u003e [!IMPORTANT]\n\u003e This section is considered **highly experimental**.\n\u003e There's currently no support for bidirectional JS/Native communication and the `native` feature flag only marks an API that will become available.\n\n**Android**\n\nSee OpenTelemetry's Android documentation on [Traces](https://opentelemetry.io/docs/languages/java/api/#tracerprovider) and [Metrics](https://opentelemetry.io/docs/languages/java/api/#meterprovider) for more information on available APIs.\n\n```kt\nimport com.opentelemetry.OpenTelemetry\n\nclass MainApplication : Application(), ReactApplication {\n    override fun onCreate() {\n        super.onCreate()\n\n        // Start the SDK\n        OpenTelemetry.init(this) {\n            debug = true\n            url = \"https://my-collector.com:4317\"\n            name = \"my-app\"\n            version = \"1.0.0\"\n            environment = \"production\"\n        }\n\n        // ..\n\n        // Use available APIs\n        val sdk = OpenTelemetry.get()\n        val meter = sdk.getMeter(\"native-scope-name\")\n        val counter = meter.counterBuilder(\"native-counter\").build()\n        counter.add(14)\n    }\n}\n```\n\n## Contributing\n\nSee the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\n\n## License\n\nMIT\n\n---\n\nMade with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcallstack%2Freact-native-open-telemetry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcallstack%2Freact-native-open-telemetry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcallstack%2Freact-native-open-telemetry/lists"}