Petr Stýblo
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee
  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # OpenTelemetry Demo with Instana [OpenTelemetry (OTel)](https://opentelemetry.io/) is a rapidly growing open-source project that aims to provide a set of standardized vendor-agnostic SDKs, APIs, and [tools](https://opentelemetry.io/docs/collector) for ingesting, transforming, and delivering application and infrastructure observability data ([traces](https://opentelemetry.io/docs/concepts/observability-primer/#distributed-traces), [metrics](https://opentelemetry.io/docs/concepts/observability-primer/#reliability--metrics), [logs](https://opentelemetry.io/docs/concepts/observability-primer/#logs)) to various open-source and vendor backends. Instana fully [embraces OpenTelemetry](https://www.instana.com/blog/instana-autotrace-fully-embracing-opentelemetry/) based on the following predicates: * Native support within the Instana agent for OpenTelemetry’s OTLP protocol used to transfer data * Seamless integration with OpenTelemetry applications in Instana’s *Dynamic Graph* * Upstream support for native Instana data export via OTel Collector and language-specific SDKs * Seamless tracing context interoperability between Instana's proprietary format and OTel's default W3C Trace-Context To bring OpenTelemetry closer to users and help them get started, the community has created a [showcase demo application](https://github.com/open-telemetry/opentelemetry-demo) that illustrates the implementation of the OpenTelemetry instrumentation and observability in a realistic environment. The demo is a collaborative effort of many individual and vendor contributors including Instana and IBM. ### Introducing the OpenTelemetry Demo webstore ![otel-demo-intro1](https://i.imgur.com/HU5YTZq.png) ![otel-demo-intro2](https://i.imgur.com/2oFQHc9.png) The demo application is a sample webshop with a space exploration theme. Build as a distributed micro-services application, it consists of a set of interconnected services with built-in OpenTelemetry instrumentation. The services are written in [11 programming languages](https://github.com/open-telemetry/opentelemetry-demo/blob/main/docs/service_table.md) in order to represent the whole breadth of available language SDKs. ![demo-architecture](https://i.imgur.com/drEAlSF.png) The demo includes idiomatic examples of using various OpenTelemetry features such as manual and automatic instrumentation, manual and automatic context propagation, custom attributes, trace events, baggage, metrics and logs. It provides developers with a convenient sandbox to learn and experiment with OpenTelemetry or to customize it for specific use-cases, such as coupling Instana-native and OpenTelemetry spans via Instana's W3C context propagation support. The demo can be run in either Docker or Kubernetes. It also comes with extensible feature-flag framework that implements several [failure injection scenarios](https://github.com/open-telemetry/opentelemetry-demo/blob/main/docs/README.md#scenarios). Let's look at how the demo can be used with Instana. We'll describe two alternative ways to ingest the generated OpenTelemetry traces/metrics and we'll highlight the unique capabilities Instana adds though the host agent monitoring. ### Using OTel Collector ![demo-otelcol](https://i.imgur.com/zsQ0LEB.png) Let's start with the simplest way to connect the demo application to Instana, using the bundled [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/). The collector is pre-configured as the default receiver of the OpenTelemetry signals coming from the demo services. To forward the tracing data to the Instana backend, we can just enable the OTel Collector's built-in Instana exporter and point it at the serverless endpoint of your SaaS or on-prem Instana instance. The configuration is as simple as adding a few lines to the Collector [configuration file](https://github.com/open-telemetry/opentelemetry-demo/blob/main/src/otelcollector/otelcol-config.yml), as shown below: ```yaml [...] exporters: instana: endpoint: ${INSTANA_ENDPOINT_URL} agent_key: ${INSTANA_AGENT_KEY} [...] service: pipelines: traces: exporters: [instana] [...] ``` Details about the configuration parameters and an example can be found in the [OpenTelemetry Collector Contrib repository](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/instanaexporter). The quick and simple approach described above is suitable for the case when you only want to receive and analyze OpenTelemetry traces without needing a deeper APM insight, or whenever you want to split and route the telemetry data to multiple backends (e.g. Prometheus, Jaeger) or perform [additional data handling](https://opentelemetry.io/docs/collector/) (batching, encryption, retries) and transformations. #### Using Instana host agent ![demo-agent](https://i.imgur.com/iAFN6eI.png) Compared to the previous basic method, Instana offers a more advanced way of supporting OpenTelemetry with a user experience and convenience similar to the native [Instana Autotrace](https://www.instana.com/supported-technologies/instana-autotrace/) technology. Instead of using the OTel Collector, we can forward the OpenTelemetry data to a local Instana host agent that provides a native OTLP receiver listening on standard ports 4317 (gRPC) and 4318 (HTTP). The key value of the agent is that it can link the received telemetry to the underlying application resources and host infrastructure that it continuously discovers and monitors. Because the agent is able to determine which process on the host is sending the OTel traces and metrics, Instana can use this mapping to extend the correlation to all related physical and logical dependencies (host, cluster, container, application runtimes) modeled by the Dynamic Graph. The infrastructure context is available to you via the omnipresent [Context Guide](https://www.instana.com/blog/context-guide-instanas-gps-for-your-applications-and-infrastructure/) and within the [Unbounded Analytics](https://www.instana.com/blog/unbounded-analytics-provides-even-easier-query-data-heres-how/) workspace for individual calls. Details on configuring the host agent, customizing the demo services and redirecting the OTLP output are beyond the scope of this report. However, the configuration and deployment of the agent is almost identical to the standard Instana monitoring, except that we need to make sure to disable the Instana-native auto-instrumentation for each demo technology/service so that it doesn't interfere with the OTel instrumentation. Below are some example Instana screens showing the OpenTelemetry demo in action: **Application services** - notice how the individual demo services are linked with the corresponding language runtimes. ![services](https://i.imgur.com/hhC2qLj.png) **Service dependencies** - showing the gRPC and REST services interaction including downstream databases ![dependencies](https://i.imgur.com/UCoIinh.png) **Unbounded Analytics** - the end-to-end trace view with child spans. A closer look inside the Instana interface would reveal the seamless Instana-to-W3C context propagation between the Frontend-proxy service (Instana-instrumented) and the rest of the demo services (OTel-instrumented) ![traces](https://i.imgur.com/UFB2dVQ.png) **Context Guide** - you can drill down the infrastructure layers all the way to the process level ![context](https://i.imgur.com/WUfx68L.png) **OpenTelemetry metrics** - received metrics are linked to the respective application process that generated the telemetry data ![metrics](https://i.imgur.com/MVOYuQA.png) --- >**Note** >If you don't yet have an Instana instance to play with you can quickly get one by signing up for a [free 14 day full trial](https://www.instana.com/trial/). --- ### ==References== - Previous Instana blogs about OpenTelemetry - https://www.instana.com/blog/instana-autotrace-fully-embracing-opentelemetry/ - https://www.instana.com/blog/what-is-opentelemetry/ - https://www.instana.com/blog/the-rise-of-distributed-tracing-with-opentelemetry/ - private references - The drawings: https://excalidraw.com/#token=MkhsZzTWYLykkzBOuZ8ar - An apt explanation of the difference between otel collector and Instana host-agent: https://stackoverflow.com/a/73635164 - https://www.ibm.com/docs/en/instana-observability/current?topic=apis-opentelemetry

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully