Skip to content

Conversation

@cgcote
Copy link

@cgcote cgcote commented Mar 18, 2025

What does this PR do?

Parses referrer hostname from http header when presents and adds it to span tags as http.referrer_hostname.

Motivation

This will be used to identify frontend clients without leaking the PII which can be contained in the entire referrer.

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.
  • 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.
  • For internal contributors, a matching PR should be created to the v2-dev branch and reviewed by @DataDog/apm-go.

Unsure? Have a question? Request a review!

v2-dev PR: https://github.com/DataDog/dd-trace-go/pull/3343/files

@github-actions github-actions bot added the apm:ecosystem contrib/* related feature requests or bugs label Mar 18, 2025
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Mar 18, 2025

Datadog Report

Branch report: charles.cote/referrer_host
Commit report: 84679c5
Test service: dd-trace-go

✅ 0 Failed, 5513 Passed, 72 Skipped, 10m 4s Total Time

@cgcote cgcote force-pushed the charles.cote/referrer_host branch from be9e1cc to 8eabb38 Compare March 18, 2025 14:53
@pr-commenter
Copy link

pr-commenter bot commented Mar 18, 2025

Benchmarks

Benchmark execution time: 2025-04-02 18:04:11

Comparing candidate commit a346d0f in PR branch charles.cote/referrer_host with baseline commit 8819cd7 in branch main.

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

@cgcote cgcote changed the title Add http.referrer_host tag Add http.referrer_hostname tag Mar 24, 2025
@cgcote cgcote changed the title Add http.referrer_hostname tag feat(apm): add referrer hostname as span tag Mar 24, 2025
@cgcote cgcote force-pushed the charles.cote/referrer_host branch from 15b9931 to ea46cb5 Compare March 24, 2025 12:18
@darccio
Copy link
Member

darccio commented May 7, 2025

Closing this in favour of #3343

@cgcote cgcote closed this May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apm:ecosystem contrib/* related feature requests or bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants