<?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>article Fixing SSL Errors in OpenTelemetry SDKs when exporting to Dynatrace ActiveGate in Troubleshooting</title>
    <link>https://community.dynatrace.com/t5/Troubleshooting/Fixing-SSL-Errors-in-OpenTelemetry-SDKs-when-exporting-to/ta-p/269404</link>
    <description>&lt;H1&gt;&lt;FONT size="5"&gt;&lt;STRONG&gt;Abstract&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H1&gt;
&lt;P&gt;This article addresses SSL errors encountered when using various OpenTelemetry SDKs (Go, Python, Java, etc.) to communicate with the environment ActiveGate in a Kubernetes (K8s) cluster. The issue arises because the environment ActiveGate uses self-signed certificates, which are not accepted by default by the OpenTelemetry SDKs. This article provides troubleshooting steps and solutions to enable the SDKs to accept these self-signed certificates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1&gt;&lt;FONT size="5"&gt;&lt;STRONG&gt;Problem&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H1&gt;
&lt;P&gt;When configuring OpenTelemetry SDKs to send telemetry data to Dynatrace ActiveGate in a K8s cluster, users may encounter SSL errors. These errors occur because the environment ActiveGate uses self-signed certificates, which the OpenTelemetry SDKs do not trust by default. As a result, the communication between the SDKs and the ActiveGate fails, preventing data from being sent.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1&gt;&lt;FONT size="5"&gt;&lt;STRONG&gt;Troubleshooting Steps&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H1&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;Verify ActiveGate Configuration&lt;/STRONG&gt;:&lt;BR /&gt;Ensure that the ActiveGate is correctly configured and accessible. You can test the connection using tools like&amp;nbsp;curl&amp;nbsp;to test whether the ActiveGate is reachable within your cluster. For example, you can execute the following command from within a pod in your cluster:&lt;BR /&gt;&lt;LI-CODE lang="markup"&gt;curl -v http://&amp;lt;activegate-service&amp;gt;.dynatrace.svc.cluster.local&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;If the connection fails, check the ActiveGate's configuration and network settings. Especially, check if there is a K8s Service object exposing the ActiveGate within the cluster.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Check SDK Configuration&lt;/STRONG&gt;:&lt;BR /&gt;&lt;SPAN&gt;Review the configuration of your OpenTelemetry SDK to ensure it is set up to communicate with the ActiveGate. Verify the endpoint URL and any authentication tokens required.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Identify the SSL Error&lt;/STRONG&gt;:&lt;BR /&gt;&lt;SPAN&gt;If the ActiveGate endpoint is reachable, and you have verified the correctness of the authentication token, check the logs of your OpenTelemetry SDK for SSL-related error messages. Common errors include &lt;/SPAN&gt;&lt;FONT face="courier new,courier"&gt;"SSLHandshakeException"&lt;/FONT&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;FONT face="courier new,courier"&gt;"certificate verify failed"&lt;/FONT&gt;&lt;SPAN&gt;, or similar messages indicating a problem with certificate validation.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;H1&gt;&lt;FONT size="5"&gt;&lt;STRONG&gt;Resolution&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H1&gt;
&lt;P&gt;To resolve the SSL errors, you need to configure the OpenTelemetry SDKs to trust the self-signed certificates used by the ActiveGate. As described in the &lt;A href="https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options" target="_blank" rel="noopener"&gt;OTLP specification&lt;/A&gt;, this can be done by setting the &lt;FONT face="courier new,courier"&gt;OTEL_EXPORTER_OTLP_CERTIFICATE&lt;/FONT&gt; environment variable to the path of the server certificate file.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&amp;nbsp;for the JavaScript SDK, this environment variable is currently not supported. In this case, you will have to load the trusted certificate programatically, as in the following example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;const exporter = new OTLPMetricExporter({
  // &amp;lt;any other settings you may have&amp;gt;
  httpAgentOptions: {
     ca: fs.readFileSync('/path/to/my/cert.pem'), // reading a file like that may throw an exception, add error handling for reading the file as needed
  }
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;By following these steps, you can configure your OpenTelemetry SDKs to accept self-signed certificates from the Dynatrace ActiveGate, resolving the SSL errors and enabling successful communication.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1 id="toc-hId-228093595"&gt;What's next&lt;/H1&gt;
&lt;P&gt;If you have any further questions, or encounter any issues not listed above, please feel free to contact our &lt;A href="https://support.dynatrace.com/" target="_blank" rel="noopener"&gt;support team.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If this article has helped you and provided you with good insight, please make sure to give the article a thumbs up (kudos)&lt;/P&gt;</description>
    <pubDate>Fri, 07 Feb 2025 14:00:00 GMT</pubDate>
    <dc:creator>florian_bacher</dc:creator>
    <dc:date>2025-02-07T14:00:00Z</dc:date>
    <item>
      <title>Fixing SSL Errors in OpenTelemetry SDKs when exporting to Dynatrace ActiveGate</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/Fixing-SSL-Errors-in-OpenTelemetry-SDKs-when-exporting-to/ta-p/269404</link>
      <description>&lt;P&gt;This article helps to troubleshoot SSL certificate validation errors when sending telemetry data to an ActiveGate via OTLP&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2025 14:00:00 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/Fixing-SSL-Errors-in-OpenTelemetry-SDKs-when-exporting-to/ta-p/269404</guid>
      <dc:creator>florian_bacher</dc:creator>
      <dc:date>2025-02-07T14:00:00Z</dc:date>
    </item>
  </channel>
</rss>

