Skip to content

Conversation

hannahkm
Copy link
Contributor

@hannahkm hannahkm commented Aug 1, 2025

What does this PR do?

Adds a new orchestrion integration for error tracing.

Motivation

In order to enable using orchestrion to automatically trace error stack traces, we need to register the errortrace package as an integration. This builds upon #3709

Jira: LANGPLAT-160

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • New code is free of linting errors. You can check this by running ./scripts/lint.sh locally.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.

Unsure? Have a question? Request a review!

name: error-tracking
description: The entry point of a Go program with error tracking.

aspects:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open question: is this the best place for the orchestrion.yml file to exist? While we call this an "integration", what we are tracing is not a contrib but rather the product itself similar to profiling. For profiling, orchestrion.yml is in ./profiling, so maybe keeping this file in ./instrumentation/errortrace is an okay option.

@pr-commenter
Copy link

pr-commenter bot commented Aug 1, 2025

Benchmarks

Benchmark execution time: 2025-08-07 21:29:03

Comparing candidate commit 5dab662 in PR branch hannahkm/update-errortrace with baseline commit 6ff12dc in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 24 metrics, 0 unstable metrics.

@hannahkm hannahkm force-pushed the hannahkm/update-errortrace branch from 48d9756 to 662db1d Compare August 5, 2025 17:25
@hannahkm hannahkm force-pushed the hannahkm/update-errortrace branch from 9956be2 to d98075f Compare August 6, 2025 21:05
@hannahkm hannahkm force-pushed the hannahkm/update-errortrace branch from d6aef88 to 8c93ec7 Compare August 7, 2025 18:02
Comment on lines 28 to 32
ctx := context.TODO()
var span *tracer.Span
span, _ = tracer.StartSpanFromContext(ctx, {{ printf "%q" .Function.Name }},
tracer.Tag("function-name", {{ printf "%q" .Function.Name }}),
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ctx := context.TODO()
var span *tracer.Span
span, _ = tracer.StartSpanFromContext(ctx, {{ printf "%q" .Function.Name }},
tracer.Tag("function-name", {{ printf "%q" .Function.Name }}),
)
{{ $ctx := .Function.ArgumentOfType "context.Context" -}}
var span *tracer.Span
span, _ = tracer.StartSpanFromContext(ctx, {{ printf "%q" .Function.Name }},
tracer.Tag("function-name", {{ printf "%q" .Function.Name }}),
)

@darccio
Copy link
Member

darccio commented Sep 5, 2025

Out of curiosity, why are there so many modified go.mod files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants