HydrologicEngineeringCenter / HydrologicEngineeringCenter/cwms-python

Support use of W3C TraceContext

Open
#288 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
16
Forks
11
Avg merge
4d 6h
Merged PRs (30d)
8

Description

CDA has implemented support for the W3C TraceContext that OpenTelemetry uses: https://github.com/USACE/cwms-data-api/pull/1800

cwms-python should except or create on API start, add allow update at any time, an appropriate traceparent header to send with all HTTP requests.

This will allow better correlation of issues in the logs.

NOTE: Recommend using the opentelemetry python library to implement the spans, traces, and propagators for this to work. There should be decorators in the library to avoid excessive boilerplate.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by locating the API initialization and the path used for all HTTP requests, then review the recommended OpenTelemetry Python library for propagators and decorators. Done means the client can accept or create trace context at startup, update it later, and send an appropriate traceparent header with every request.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.