<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Gravitee.io  - Tracing support with OpenTelemetry in Dynatrace tips</title>
    <link>https://community.dynatrace.com/t5/Dynatrace-tips/Gravitee-io-Tracing-support-with-OpenTelemetry/m-p/259515#M1466</link>
    <description>&lt;P&gt;If you have OneAgent on the gravitee host, normally OneAgent will collect the OTEL traces and the collector is not required. Unfortunately, Gravitee configuration for OpenTelemetry plugin requires a valid configuration and output, otherwise, it will produce a lot of errors about the plugin being unable to export traces.&lt;BR /&gt;&lt;BR /&gt;So a valid destination in Gravitee is needed. It's not possible to include and enable the plugin without it.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Oct 2024 06:44:53 GMT</pubDate>
    <dc:creator>Julius_Loman</dc:creator>
    <dc:date>2024-10-17T06:44:53Z</dc:date>
    <item>
      <title>Gravitee.io  - Tracing support with OpenTelemetry</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-tips/Gravitee-io-Tracing-support-with-OpenTelemetry/m-p/256851#M1436</link>
      <description>&lt;P&gt;The Gravitee.io API gateway is not a directly supported technology by OneAgent. Without support, you are unable to see any processing within the API gateway, and traces stop at the API gateway.&amp;nbsp; Luckily, there is OpenTelemetry support for Gravitee 4.x helping to overcome this.&lt;/P&gt;&lt;H1&gt;Steps to get this working &lt;STRONG&gt;for Gravitee 4.6 or higher:&lt;/STRONG&gt;&lt;/H1&gt;&lt;H2&gt;&lt;STRONG&gt;Prerequisites&lt;BR /&gt;&lt;/STRONG&gt;&lt;/H2&gt;&lt;P&gt;If you run OneAgent on the Gravitee Gateway host, either turn off deep monitoring for the Gateway process or turn off the following OneAgent features for the Gravitee Gateway process groups, otherwise, you will have duplicate spans and/or tracing is broken.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Java Netty&lt;/LI&gt;&lt;LI&gt;Java OpenTelemetry&lt;/LI&gt;&lt;/UL&gt;&lt;H2&gt;Option 1 -&amp;nbsp;&lt;STRONG&gt;send traces directly to Dynatrace&lt;/STRONG&gt; (SaaS or Managed)&lt;/H2&gt;&lt;OL&gt;&lt;LI&gt;Create an Api Token in your Dynatrace environment with scope trace ingest scope.&lt;/LI&gt;&lt;LI&gt;Configure tracing in Gravitee based on&amp;nbsp;&lt;A href="https://documentation.gravitee.io/apim/analyze-and-monitor-apis/opentelemetry#enable-opentelemetry-for-your-gateway" target="_blank" rel="noopener"&gt;https://documentation.gravitee.io/apim/analyze-and-monitor-apis/opentelemetry#enable-opentelemetry-for-your-gateway&lt;/A&gt;,&amp;nbsp;typically in gravitee.yml, where&lt;BR /&gt;&amp;lt;DT_ENVIRONMENT&amp;gt; is URL for the Dynatrace environment like &lt;A href="https://abc12345.live.dynatrace.com" target="_blank" rel="noopener"&gt;https://abc12345.live.dynatrace.com&lt;/A&gt;&amp;nbsp;for SaaS or &lt;A href="https://host/e/&amp;lt;environmentid" target="_blank" rel="noopener"&gt;https://host/e/&amp;lt;environmentid&lt;/A&gt;&amp;nbsp;for Managed&lt;/LI&gt;&lt;/OL&gt;&lt;LI-CODE lang="markup"&gt;services:
  opentelemetry:
    enabled: true
    verbose: false    
    exporter:
      endpoint: &amp;lt;DT_ENVIRONMENT&amp;gt;/api/v2/otlp
      protocol: http/protobuf
      compression: gzip
      headers:
        - Authorization: api-token &amp;lt;API_TOKEN&amp;gt;​&lt;/LI-CODE&gt;&lt;P&gt;Adjust other parameters, if necessary, such as SSL (typically needed in Managed environments only) or proxy.&lt;/P&gt;&lt;H2&gt;Option 2 - Send traces&amp;nbsp;&lt;STRONG&gt;using locally running fullstack OneAgent&lt;/STRONG&gt;&lt;/H2&gt;&lt;P&gt;If you want to send &lt;STRONG&gt;traces using locally running full-stack OneAgent&lt;/STRONG&gt;, you can simplify the configuration a little bit, and spans are also included in the OneAgent full-stack license compared to Option 1.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Ensure EEC is enabled on the OneAgent hosts or globally in Dynatrace, see&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/shortlink/extension-concepts" target="_blank" rel="noopener"&gt;https://docs.dynatrace.com/docs/shortlink/extension-concepts&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;Configure Gravitee Gateway in gravitee.yml (or accordingly if other options are used).&amp;nbsp;&lt;/LI&gt;&lt;/OL&gt;&lt;LI-CODE lang="markup"&gt;services:
  opentelemetry:
    enabled: true
    verbose: false    
    exporter:
      endpoint: http://localhost:14499/otlp
      protocol: http/protobuf
      compression: none&lt;/LI-CODE&gt;&lt;H2&gt;Option 3 - Send traces if Gravitee runs in Kubernetes using Dynatrace Operator Telemetry ingest&lt;/H2&gt;&lt;P&gt;This requires Dynatrace Operator 1.6 or newer on the cluster running Gravitee gateway.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Enable and configure the Telemetry ingest with Dynatrace Operator by following&amp;nbsp; &lt;A href="https://docs.dynatrace.com/docs/shortlink/guides-telemetry-ingest" target="_blank" rel="noopener"&gt;Telemetry ingest support&lt;/A&gt;.&lt;/LI&gt;&lt;LI&gt;Configure Gravitee Gateway in gravitee.yml (or accordingly if other options are used), adjust the hostname accordingly to your dynakube configuration:&lt;/LI&gt;&lt;/OL&gt;&lt;LI-CODE lang="markup"&gt;services:
  opentelemetry:
    enabled: true
    verbose: false    
    exporter:
      endpoint: http://dynakube-telemetry-ingest.dynatrace.svc:4317
      protocol: grpc&lt;/LI-CODE&gt;&lt;H2&gt;Additional considerations&lt;/H2&gt;&lt;P&gt;If you want a relation between the Unified service and process group instance, you need to add the resource attributes &lt;STRONG&gt;dt.entity.process_group_instance&lt;/STRONG&gt; and &lt;STRONG&gt;dt.entity.host&lt;/STRONG&gt; (added automatically if you send traces using locally installed OneAgent (option two). Although adding resource attributes can be accomplished by adding extraAttributes parameter in Gravitee, it does not work for keys with an underscore character, so an easier solution is to use OpenTelemetry Collector or Dynatrace collector to add the values. See an example below using the locally installed OneAgent as final ingest endpoint:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317

processors:
  resource:
    attributes:
      - key: dt.entity.host
        value: &amp;lt;HOST&amp;gt;
        action: upsert
      - key: dt.entity.process_group_instance
        value: &amp;lt;PROCESS_GROUP_INSTANCE&amp;gt;
        action: upsert

exporters:
  otlphttp:
    endpoint: http://localhost:14499/otlp

service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [resource]
      exporters: [otlphttp]
    metrics:
      receivers: [otlp]
      processors: [resource]
      exporters: [otlphttp]
    logs:
      receivers: [otlp]
      processors: [resource]
      exporters: [otlphttp]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H1&gt;Steps to get this working &lt;STRONG&gt;for Gravitee 4.5 or lower:&lt;/STRONG&gt;&lt;/H1&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;If your version is 4.3 or lower&lt;/STRONG&gt;, please add &lt;A href="https://repo1.maven.org/maven2/io/opentelemetry/opentelemetry-api/1.39.0/opentelemetry-api-1.39.0.jar" target="_self"&gt;opentelemetry-api-1.39.0.jar&lt;/A&gt; and&amp;nbsp;&lt;A href="https://repo1.maven.org/maven2/io/opentelemetry/opentelemetry-context/1.39.0/opentelemetry-context-1.39.0.jar" target="_self"&gt;opentelemetry-context-1.39.0.jar&lt;/A&gt; libraries to lib/ext/ directory. You can download them from maven (links above).&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;If your version is 4.3 or lowser&lt;/STRONG&gt;, please add&amp;nbsp;&lt;A href="https://download.gravitee.io/graviteeio-apim/plugins/tracers/gravitee-tracer-opentelemetry/gravitee-tracer-opentelemetry-1.0.1.zip" target="_self"&gt;gravitee-tracer-opentelemetry-1.0.1.zip&lt;/A&gt;&amp;nbsp;(or newer) to plugins directory unless you are already using a distribution with the plugin.&lt;/LI&gt;&lt;LI&gt;Create an Api Token in your Dynatrace environment with scope trace ingest scope.&lt;/LI&gt;&lt;LI&gt;Deploy OpenTelemetry collector to the host where the Gravitee API gateway is running or where it fits your case. You can also reuse existing collectors. I recommend using Dynatrace distribution directly, see&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/shortlink/otel-collector-deploy" target="_blank" rel="noopener"&gt;https://docs.dynatrace.com/docs/shortlink/otel-collector-deploy&lt;/A&gt;&amp;nbsp;for deployment&lt;/LI&gt;&lt;LI&gt;Configure your OpenTelemetry collector, sample config is below and it includes OpenTelemetry resource attributes to map the ingested traces to existing entities in Dynatrace. In the same change:&lt;BR /&gt;&amp;lt;HOST&amp;gt; for your HOST entity ID&amp;nbsp; where your API gateway is running,&lt;BR /&gt;&amp;lt;PROCESS_GROUP_INSTANCE&amp;gt; for your process group instance of the API gateway process on the host&lt;BR /&gt;&amp;lt;ENVIRONMENT&amp;gt; for your Dynatrace environment URL e.g. &lt;A href="https://abc12345.live.dynatrace.com" target="_blank" rel="noopener"&gt;https://abc12345.live.dynatrace.com&lt;/A&gt;&lt;BR /&gt;&amp;lt;APITOKEN&amp;gt; for your API token created in the previous step&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317

processors:
  resource:
    attributes:
      - key: dt.entity.host
        value: &amp;lt;HOST&amp;gt;
        action: upsert
      - key: dt.entity.process_group_instance
        value: &amp;lt;PROCESS_GROUP_INSTANCE&amp;gt;
        action: upsert

exporters:
  otlphttp:
    endpoint: &amp;lt;ENVIRONMENT&amp;gt;/api/v2/otlp
    headers:
      Authorization: "Api-Token &amp;lt;APITOKEN&amp;gt;"

service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [resource]
      exporters: [otlphttp]
    metrics:
      receivers: [otlp]
      processors: [resource]
      exporters: [otlphttp]
    logs:
      receivers: [otlp]
      processors: [resource]
      exporters: [otlphttp]
​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Start or restart the OpenTelemetry collector.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Configure Gravitee API gateway in gravitee.yml to include OpenTelemetry tracer. In case the OpenTelemetry collector is not running on the same host, change the URL accordingly.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;  tracing:                 
    enabled: true 
    type: otel                                                   
    otel:                                                                         
      url: grpc://localhost:4317​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Restart the API gateway process, you should see the enablement of the otel tracing in the API gateway logs:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;13:58:09.943 [graviteeio-node] [] INFO  i.g.node.tracing.TracingService - Tracing support is enabled with tracer: name[otel]​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Traces now should be ingested and a new Unified service should be created on the API Gateway process:&lt;BR /&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Julius_Loman_1-1727104397369.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/22808iD97A7A0EAD32A80B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Julius_Loman_1-1727104397369.png" alt="Julius_Loman_1-1727104397369.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;You should now see full traces including the API Gateway processing.&amp;nbsp; In the image below - the red part is from OneAgent, the blue part is from the OpenTelemetry tracing plugin, and the green part is from another service monitored by OneAgent.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Julius_Loman_2-1727104627087.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/22809iAB901F1739195C75/image-size/large?v=v2&amp;amp;px=999" role="button" title="Julius_Loman_2-1727104627087.png" alt="Julius_Loman_2-1727104627087.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Just a few notes:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;OneAgent deployment is not required but I recommend doing it for licensing and better request monitoring&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Although the OpenTelemetry plugin for Gravitee includes OTLP http output, it supports only the JSON payload which is on the other side not supported by Dynatrace. Dynatrace supports protobuf only for OTLP. That's why OpenTelemetry collector is required.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Mon, 05 Jan 2026 16:01:53 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-tips/Gravitee-io-Tracing-support-with-OpenTelemetry/m-p/256851#M1436</guid>
      <dc:creator>Julius_Loman</dc:creator>
      <dc:date>2026-01-05T16:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Gravitee.io  - Tracing support with OpenTelemetry</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-tips/Gravitee-io-Tracing-support-with-OpenTelemetry/m-p/258902#M1458</link>
      <description>&lt;P&gt;Hello Julius, thanks for this tutorial! Especially for the note on OTLP HTTP output. The OneAgent is deployed on the gateway. We thought we would be able to capture the OpenTelemetry traces directly, but it was not possible without the OTel Collector.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2024 09:01:47 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-tips/Gravitee-io-Tracing-support-with-OpenTelemetry/m-p/258902#M1458</guid>
      <dc:creator>agonzalez</dc:creator>
      <dc:date>2024-10-11T09:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Gravitee.io  - Tracing support with OpenTelemetry</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-tips/Gravitee-io-Tracing-support-with-OpenTelemetry/m-p/258910#M1459</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/3364"&gt;@Julius_Loman&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thanks for the detailed configuration. While not a Gravitee.io user, it's great to know how certain services are implementing OpenTelemetry and how they integrate with Dynatrace.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2024 09:29:59 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-tips/Gravitee-io-Tracing-support-with-OpenTelemetry/m-p/258910#M1459</guid>
      <dc:creator>AntonioSousa</dc:creator>
      <dc:date>2024-10-11T09:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: Gravitee.io  - Tracing support with OpenTelemetry</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-tips/Gravitee-io-Tracing-support-with-OpenTelemetry/m-p/258922#M1460</link>
      <description>&lt;P&gt;It seems that my traces aren't complete, I think Gravitee remove headers, did it happened to you ?&lt;/P&gt;&lt;P&gt;Can you confirm the header that I need to be forwarded by Gravitee, I supposed the following:&lt;/P&gt;&lt;P&gt;- x-dynatrace&lt;/P&gt;&lt;P&gt;- traceparent&lt;/P&gt;&lt;P&gt;- tracestate&lt;/P&gt;&lt;P&gt;Is there anything else I should be carefull about ?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2024 10:12:31 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-tips/Gravitee-io-Tracing-support-with-OpenTelemetry/m-p/258922#M1460</guid>
      <dc:creator>agonzalez</dc:creator>
      <dc:date>2024-10-11T10:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Gravitee.io  - Tracing support with OpenTelemetry</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-tips/Gravitee-io-Tracing-support-with-OpenTelemetry/m-p/258952#M1462</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/58691"&gt;@agonzalez&lt;/a&gt;&amp;nbsp;it did not happen in my case. Maybe this is specific to your gravitee.io setup (a policy removing specific headers?) or something else is removing headers. I recommend setting up request attributes on the services to capture the values. You need just w3c headers (traceparent, tracestate) for this to work.&lt;BR /&gt;&lt;BR /&gt;Basically, the tricky part was just the OTLP HTTP setup which produces JSON only and this is not mentioned in the docs.&lt;BR /&gt;&lt;BR /&gt;One important caveat is the enrichment of traces with Dynatrace resource attributes, so your trace ingest is covered by a full-stack oneagent license - but that's already in my setup above.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2024 14:35:20 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-tips/Gravitee-io-Tracing-support-with-OpenTelemetry/m-p/258952#M1462</guid>
      <dc:creator>Julius_Loman</dc:creator>
      <dc:date>2024-10-11T14:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: Gravitee.io  - Tracing support with OpenTelemetry</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-tips/Gravitee-io-Tracing-support-with-OpenTelemetry/m-p/259515#M1466</link>
      <description>&lt;P&gt;If you have OneAgent on the gravitee host, normally OneAgent will collect the OTEL traces and the collector is not required. Unfortunately, Gravitee configuration for OpenTelemetry plugin requires a valid configuration and output, otherwise, it will produce a lot of errors about the plugin being unable to export traces.&lt;BR /&gt;&lt;BR /&gt;So a valid destination in Gravitee is needed. It's not possible to include and enable the plugin without it.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 06:44:53 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-tips/Gravitee-io-Tracing-support-with-OpenTelemetry/m-p/259515#M1466</guid>
      <dc:creator>Julius_Loman</dc:creator>
      <dc:date>2024-10-17T06:44:53Z</dc:date>
    </item>
  </channel>
</rss>

