Skip to content

Read nf.container from NETFLIX_CONTAINER_NAME - #1301

Merged
brharrington merged 1 commit into
mainfrom
nf-container-attribution
Oct 14, 2026
Merged

brharrington merged 1 commit into
mainfrom
nf-container-attribution

Conversation

@ecbadeaux

@ecbadeaux ecbadeaux commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Title: Read nf.container from NETFLIX_CONTAINER_NAME, falling back to TITUS_CONTAINER_NAME

Summary

nf.container is now read from NETFLIX_CONTAINER_NAME first, falling back to TITUS_CONTAINER_NAME. Two places set it, and both are updated:

  • spectator-reg-sidecar: CommonTags, the default for SidecarConfig.commonTags()
  • spectator-nflx-tagging: NetflixTagging.commonTags()

nf.process is unchanged and still comes from NETFLIX_PROCESS_NAME.

Why

TITUS_CONTAINER_NAME exists only on Titus, so containers on other platforms get no nf.container tag today. NETFLIX_CONTAINER_NAME is a platform-neutral variable that holds the container's name (the Kubernetes container name). Reading it first, with the Titus variable as the fallback, adds coverage for other platforms and leaves Titus unchanged.

Behavior

NETFLIX_CONTAINER_NAME TITUS_CONTAINER_NAME nf.container
app main app
unset, empty or blank main main
app unset app
unset unset not added
  • Same helper as before. It uses the existing putIfNotEmptyOrNull helper, which already accepts several variables. Values are trimmed and blank values are skipped, as before.
  • No change on Titus. While NETFLIX_CONTAINER_NAME is unset, the tags are exactly what they are today.
  • Precedence is unchanged. In SidecarRegistry, these common tags still override a meter tag with the same key. The Javadoc now says so, and a test pins it.

@brharrington brharrington added this to the 1.10.9 milestone Oct 14, 2026
@brharrington brharrington changed the title Container Update Read nf.container from NETFLIX_CONTAINER_NAME Oct 14, 2026
@brharrington
brharrington merged commit 10ef7c6 into main Oct 14, 2026
1 check passed
@brharrington
brharrington deleted the nf-container-attribution branch October 14, 2026 20:04
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.

2 participants