inception-health / otel-export-trace-action

MIT License
92 stars 28 forks source link

Support for HTTPS tracing protocol #194

Open danielloader opened 8 months ago

danielloader commented 8 months ago

It looks from glancing at the source this action only supports gRPC for the OTEL traces, can I confirm this is correct?

Looks that you'd need to import/use https://www.npmjs.com/package/@opentelemetry/exporter-trace-otlp-proto conditionally based on the environment variable for the protocol, or pickup and guess from the endpoint protocol prefix in the URI.

Was trying to use the action with grafana cloud but they haven't got gRPC support yet for ingesting OTEL tracing spans and as expected if the above assumption is true then it's an expected failure.

      - name: Export Workflow Trace
        uses: inception-health/otel-export-trace-action@latest
        env: 
          OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
        with:
          otlpEndpoint: https://otlp-gateway-prod-eu-west-2.grafana.net/otlp
          otlpHeaders: "Authorization=Basic ${{ secrets.OLTP_ACTIONS_TRACES_HEADER }}"
          githubToken: ${{ secrets.GITHUB_TOKEN }}
          runId: ${{ github.event.workflow_run.id }}

Source: https://grafana.com/docs/grafana-cloud/send-data/otlp/send-data-otlp/#push-directly-from-applications-using-the-opentelemetry-sdks

https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_traces_protocol

gerhard commented 7 months ago

I was looking at doing exactly the same thing @danielloader.

Did you manage to make progress with this?

corentinmusard commented 7 months ago

I'll want to use http as well, any update?

corentinmusard commented 4 months ago

Hi! @gerhard @danielloader

Because this repo looks unmaintained I added support for https in my fork corentinmusard/otel-cicd-action.

I plan to maintain and release more features on my fork, feel free to use it.

If you want to give it a try, you just have to replace the action name:

uses: corentinmusard/otel-cicd-action@v1

Please tell me if it's not working as intended :slightly_smiling_face:

gerhard commented 2 months ago

Thank you @corentinmusard! Using your fork in: