-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: Support environment-service pair to map to traceproviders #240
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
0b61fd7
Register funcs to support environment
thugrock7 74da0a7
Merge remote-tracking branch 'origin/main' into multi-env-support
thugrock7 f16d6e0
Merge remote-tracking branch 'origin/main' into multi-env-support
thugrock7 895af69
envServicePair usage
thugrock7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is the key input from gateway agents, I think it should be prefixed with traceableai. I'd say traceableai.environment.name is a better key
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wanted to keep "traceable" name out of hypertrace repos. Don't know the convention we follow though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather keep environment notion itself out of this repo. It'll be scattered if you add that notion here. Because initially we made it traceable specific one. ref, https://github.com/Traceableai/agent-config/blob/main/proto/ai/traceable/agent/config/v1/config.proto#L22
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it's gonna be like hypertrace agent provides environment specific tracers, but traceable goagent is used for getting environment specific filters when you think about it from a tracer-filter pair pov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree to keep environment notion out of this repo. Just thinking on lines of making traceable-goagent to have multi environment support as the TA, to register services there we mitigate that logic to
RegisterServiceWithSpanProcessorWrapper()
(here), the only problem is we assume a unique key for traceProviders here which service name used to do. But if we want to create a multi-env support for traceable-goagent, where a same service name can exist in different environments, this current setup fails due to this traceProviderMap. So here I only intend to use unique key to create tracer.May be other way is to form a unique key in traceable-goagent itself, and use that to call the RegisterServiceWithSpanProcessorWrapper(unique_key, resourceAttributes), but as here we add resource attrs, didn't feel it generic enough and dropped that idea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still dont understand why you can't add all of this logic in TPA itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it that the argument name is service_name across our api, but actually we would be passing
environment::sep::service_name
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently we have for each service in extcap a unique tracerfilterpair .The tracerSets of ext_cap(link) use goagent to create a tracer, which in current setup will fail for cases of same service name which can be case in multiple environments. So to avoid depending on only service name as key which can no longer be unique, formed the unique key here (encode) itself in PR. Although this could could come from TPA itself, then we should decode for place like here to get to add resource attrs, and get service name etc correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you want to decode the value? Afair, the map itself would be coming from TPA right?