Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-inject the IP tag for operator-injected agent #871

Merged
merged 1 commit into from
Feb 5, 2020

Conversation

rubenvp8510
Copy link
Collaborator

Fixes #865

Signed-off-by: Ruben Vargas ruben.vp8510@gmail.com

Name: envVarPodIp,
ValueFrom: &corev1.EnvVarSource{
FieldRef: &corev1.ObjectFieldSelector{
FieldPath: "status.podIP",
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the original request was to have the host IP, not the pod. IIRC, the pod IP will already be reported as part of the process tags.

cc @TBBle

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Haaa you are totally right! Changed.

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>
Copy link
Contributor

@jpkrohling jpkrohling left a comment

Choose a reason for hiding this comment

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

LGTM. Could you add a screenshot to this issue, so that we know what to expect in case this feature is available?

pkg/inject/sidecar.go Show resolved Hide resolved
Copy link
Contributor

@TBBle TBBle left a comment

Choose a reason for hiding this comment

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

Sorry, didn't mean to start a review there.

"cluster", "undefined", // this value isn't currently available
"deployment.name", dep.Name,
"pod.namespace", dep.Namespace,
"pod.name", fmt.Sprintf("${%s:}", envVarPodName),
"ip", fmt.Sprintf("${%s:}", envVarHostIP),
Copy link
Contributor

@TBBle TBBle Jan 24, 2020

Choose a reason for hiding this comment

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

So it's not lost in the other thread, this needs to go back to host.ip, as when a tracer library submits traces with a process tag ip, the resulting trace will end up with two such tags, rather than one suppressing the other as I had assumed. i.e. 99a0d66 was fine.

@rubenvp8510
Copy link
Collaborator Author

After read all the discussion I reverted the last change , back to host.ip tag name.

Copy link
Contributor

@jpkrohling jpkrohling left a comment

Choose a reason for hiding this comment

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

LGTM. I'm OK with this change, but would be nice to also get feedback from @pavolloffay or @objectiser about whether or not this is appropriate. My concern is that we might be getting close to the point where we add too much stuff to the span that we might not need.

Copy link
Contributor

@objectiser objectiser left a comment

Choose a reason for hiding this comment

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

@jpkrohling @rubenvp8510 Another option (for now) would be to keep the environment variable, but not implicitly add it to the list of preconfigured jaeger-tags. The user could then define their own jaeger tags list, using the tag name they want.

@TBBle
Copy link
Contributor

TBBle commented Jan 28, 2020

I've be fine with having the env-var and manually using it, but it'd be nice if this was either the case for all the parameters, or the agent args in the Jaeger CRD were additive, so I don't lose the rest of the magic info. I really don't want to have to teach my processes about their own deployment name, namespace, etc, but I don't mind a template Jaeger resource I can give users that enables those values.

My preference is to keep 'em all, or trim ones that aren't valuable though. Less configuration (and hence less teaching of configuration) makes me a happier developer. ^_^

@objectiser
Copy link
Contributor

@TBBle Agree it might be nice to add new jaeger-tags rather than replacing the existing set when the option is explicitly used in the CRD. Only concern is that then there is no way for a user to remove those tags if they are not wanted.

@jpkrohling
Copy link
Contributor

I'd be OK with merging this PR as is, and see if we have a need for further tags in the future. This might be the last one we can automatically add anyway...

@objectiser
Copy link
Contributor

The other thing to keep an eye on is OpenTelemetry: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/data-resource-semantic-conventions.md

IP attribute is not covered currently, but host.ip would fit in with convention used in this section.

@TBBle
Copy link
Contributor

TBBle commented Jan 28, 2020

That document suggests to me that we should be (later...) exposing all these attributes as env-vars, and then --jaeger.tags could be user-provided to choose the tag names, but wouldn't need access to the data.

That said, I understand OpenTelemetry has plans for their own agents, so it might never be a super-interesting use-case for this part of the Jaeger Operator, but remains academically interesting.

@jpkrohling
Copy link
Contributor

@TBBle, @objectiser : what's the verdict then?

@objectiser
Copy link
Contributor

I think the agreement was to merge as-is, unless you have changed your mind?

@jpkrohling
Copy link
Contributor

No, just wanted to confirm before merging :-)

@jpkrohling jpkrohling merged commit 80f7855 into jaegertracing:master Feb 5, 2020
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.

Auto-inject the IP tag for Operator-injected Agents
4 participants