Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Google cloud trace exposes an OLTP

Hello,
I wanted to know if Google cloud trace exposes an OLTP endpoint?
Indeed, I have a strimzi configuration and I would like to perform opentelemetry type tracing and then export these traces to Google Trace Explorer. But export I need an OLTP endpoint from google cloud trace.
Sincerely

0 4 1,069
4 REPLIES 4

Unfortunately, Google Cloud Trace does not directly expose an OLTP endpoint for sending traces. However, you can still achieve your goal of exporting OpenTelemetry traces to Google Cloud Trace Explorer using the following methods:

1. OpenTelemetry Collector with Google Cloud exporter:

  • Install and configure the OpenTelemetry Collector with the Google Cloud exporter on your Strimzi cluster.
  • The OpenTelemetry Collector will receive traces from your applications using the OpenTelemetry protocol (OTLP).
  • The Google Cloud exporter will then convert the traces to the format expected by Google Cloud Trace and send them to Google Cloud Trace API.
  • You can find instructions for setting up the OpenTelemetry Collector and Google Cloud exporter in the official documentation: https://cloud.google.com/trace/docs/setup/opentelemetry

2. Cloud Operations for GKE:

  • If you are using GKE, you can leverage Cloud Operations for GKE, which integrates OpenTelemetry natively.
  • It automatically collects traces from your applications deployed on GKE and sends them to Google Cloud Trace without needing to configure the OpenTelemetry Collector manually.
  • You can read more about Cloud Operations for GKE here: https://cloud.google.com/stackdriver/docs/managed-prometheus/gke

Additional Notes:

  • While Google Cloud Trace does not directly expose an OLTP endpoint, the Google Cloud exporter for OpenTelemetry uses the Cloud Trace API under the hood.
  • Make sure you have the necessary permissions and authentication configured for the exporter to access the Cloud Trace API.
  • You can find more information about the Cloud Trace API here: https://cloud.google.com/trace/docs/reference

Thank you for your reply.

I have a Strimzi config for KafkaConnect. In this config I activated OpenTelemetry by adding the option:
tracing:
     type: opentelemetry

As in this official doc : https://strimzi.io/blog/2023/03/01/opentelemetry/

I don't know if I can add the export option to export to Google cloud trace. Do you have any suggestion please ?

HI @Navirash ,

Thanks for clarification. While you cannot directly add an export option to the Strimzi config for exporting to Google Cloud Trace, you can achieve this by configuring the Ops Agent to collect and export traces from Strimzi to Cloud Trace. Here's how you can do it:

Prerequisites:

  • A Strimzi deployment configured to emit trace data using the OpenTelemetry Protocol (OTLP).
  • The Ops Agent installed and deployed on your Kubernetes cluster where Strimzi is running.

Steps:

  1. Enable OpenTelemetry in Strimzi: Make sure your Strimzi deployment is configured to emit trace data using the OpenTelemetry Protocol (OTLP). This is typically done by setting the tracing type to opentelemetry in the Strimzi configuration.

  2. Deploy the Ops Agent: Install and deploy the Ops Agent on your Kubernetes cluster where Strimzi is running. The Ops Agent will act as a collector for OTLP trace data from Strimzi.

  3. Configure the Ops Agent to Receive OTLP Trace Data: Add the following configuration to the Ops Agent's receiver section:

 
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: "0.0.0.0:55680"
  1. Configure the Ops Agent to Export to Cloud Trace: Add the following configuration to the Ops Agent's exporter section:
 
exporters:
  trace:
    type: cloudtrace
    project_id: "YOUR_PROJECT_ID"
    region: "YOUR_REGION"
  1. Restart the Ops Agent: After configuring, restart the Ops Agent pod to apply the new settings. The Ops Agent will then start collecting and exporting trace data to Cloud Trace.

Additional Considerations:

  • Security and Network Configuration: Verify that the network setup allows for communication between Strimzi and the Ops Agent, and that the Ops Agent can successfully send data to Google Cloud Trace.

  • Authentication and Permissions: Ensure that the Ops Agent has the necessary permissions to send data to Google Cloud Trace, typically involving configuring service accounts and IAM roles in Google Cloud.

  • Monitoring and Troubleshooting: Monitor the integration to confirm that traces are being correctly collected and exported. Be prepared to address any issues related to network connectivity, permissions, or configuration errors.

  • Documentation: Always refer to the latest documentation for Strimzi, OpenTelemetry, the Ops Agent, and Google Cloud Trace for up-to-date setup instructions and best practices.

Hi @ms4446 
Thank you for your help. It's much clearer to me.
I will try to implement what you described to me.