Git Product home page Git Product logo

opentelemetry-swift's Introduction

opentelemetry-swift

A swift OpenTelemetry client

Installation

This package includes several libraries. The OpenTelemetryApi library includes protocols and no-op implementations that comprise the OpenTelemetry API following the specification. The OpenTelemetrySdk library is the reference implementation of the API.

Libraries 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.

Please note that this library is currently in development, and you should be careful before using in production environments.

Adding the dependency

opentelemetry-swift is designed for Swift 5. To depend on the opentelemetry-swift package, you need to declare your dependency in your Package.swift:

.package(url: "https://github.com/open-telemetry/opentelemetry-swift", from: "0.6.0"),

and to your application/library target, add OpenTelemetryApi or OpenTelemetrySdkto your dependencies, e.g. like this:

.target(name: "ExampleTelemetryProducerApp", dependencies: ["OpenTelemetryApi"]),

or

.target(name: "ExampleApp", dependencies: ["OpenTelemetrySdk"]),

Current status

Please note Tracing spec follows version 1.0.1 and should be considered almost stable now. Metrics support is experimental, and the spec is still under development

Currently Tracing, Metrics and Baggage API's and SDK are implemented, also OpenTracing shims, for compatibility with existing Opentracing code.

Implemented traces exporters: Stdout, Jaeger, Zipkin, Datadog and OpenTelemetry collector

Implemented metrics exporters: Prometheus, Datadog, and OpenTelemetry collector

Examples

The package includes some example projects with basic functionality:

  • Logging Tracer - Simple api implementation of a Tracer that logs every api call
  • Simple Exporter - Shows the Jaeger an Stdout exporters in action using a MultiSpanExporter. Can be easily modified for other exporters
  • Prometheus Sample - Shows the Prometheus exporter reporting metrics to a Prometheus instance

opentelemetry-swift's People

Contributors

nachobonafonte avatar bryce-b avatar sergeykanzhelev avatar rayzhao1998 avatar johnbley avatar vj4iosdev avatar aellett avatar xxzap avatar austinlparker avatar sherlouk avatar jomisj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.