Skip to content

fix: ensure correct OTLP endpoint usage and fix output linking logic#221

Closed
l50 wants to merge 3 commits into
mainfrom
jayson/eng-3520-backend-apioteltraces-endpoint-returning-500-errors-on-trace
Closed

fix: ensure correct OTLP endpoint usage and fix output linking logic#221
l50 wants to merge 3 commits into
mainfrom
jayson/eng-3520-backend-apioteltraces-endpoint-returning-500-errors-on-trace

Conversation

@l50
Copy link
Copy Markdown
Contributor

@l50 l50 commented Nov 13, 2025

Key Changes:

  • Updated OTLP exporter to support custom API endpoints without default suffixes
  • Fixed Task output linking to only occur when output is actually logged
  • Added comprehensive tests for OTLP exporter and Task output linking logic

Added:

  • Unit tests for CustomOTLPSpanExporter endpoint/user-agent logic and Task output
    linking to ensure correct behavior and prevent regression - tests/test_otel_exporter.py

Changed:

  • CustomOTLPSpanExporter now accepts a custom_endpoint parameter to allow
    direct specification of the full trace endpoint, bypassing the default
    /v1/traces suffix logic
  • OTLP exporter initialization in Dreadnode updated to pass both base endpoint
    and custom endpoint, ensuring traces are sent to the correct API path
  • Task output linking logic refactored to only link output and input object
    hashes when the output is actually logged, preventing potential NoneType
    errors and incorrect associations

Generated Summary:

  • Introduced a custom endpoint feature in CustomOTLPSpanExporter to allow bypassing OTLP's default /v1/traces URL suffix.
  • Added functionality to extract and utilize a custom endpoint while preserving existing endpoint logic.
  • Enhanced User-Agent management by combining provided User-Agent string with the default one, ensuring proper format.
  • Fixed potential UnboundLocalError in the Task class by initially setting output_object_hash to None before condition checks.
  • Added comprehensive unit tests for the CustomOTLPSpanExporter, ensuring correct endpoint handling and User-Agent combination logic.
  • Created tests to validate the output linking behavior in the Task class, ensuring proper functionality with multiple input hashes and conditional linking.
  • Increased code robustness with additional checks and fallback mechanisms for endpoint configurations.

This summary was generated with ❤️ by rigging

@l50 l50 requested review from briangreunke and monoxgas and removed request for briangreunke November 13, 2025 02:34
@dreadnode-renovate-bot dreadnode-renovate-bot Bot added the area/tests Changes to test files and testing infrastructure label Nov 13, 2025
**Changed:**

- Updated CustomOTLPSpanExporter to accept a custom_endpoint parameter, allowing
  use of endpoints that do not follow the OTLP default /v1/traces path
- Modified Dreadnode class to pass a base endpoint and a custom_endpoint to the
  OTLP exporter, ensuring traces are sent to the intended API path
- Fixed output linking in Task to only link output and input object hashes when
  output is actually logged, preventing potential NoneType errors and incorrect
  associations
@l50 l50 force-pushed the jayson/eng-3520-backend-apioteltraces-endpoint-returning-500-errors-on-trace branch from 8c1cfb1 to a4c07be Compare November 13, 2025 02:36
l50 added 2 commits November 12, 2025 19:49
…version

**Changed:**

- Standardized variable naming in user agent combination tests to use snake_case,
  improving code style and consistency in `test_otel_exporter.py`
- Updated `dreadnode` package version to 1.15.4 in `uv.lock`
- Decremented `uv.lock` revision number from 3 to 2 for lockfile consistency
- Minor whitespace and import ordering improvements in `test_otel_exporter.py`
@l50
Copy link
Copy Markdown
Contributor Author

l50 commented Nov 13, 2025

False positive resulting from doing a pip install of sdk rather than using latest sdk code from main branch. Closing.

@l50 l50 closed this Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/tests Changes to test files and testing infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant