-
Notifications
You must be signed in to change notification settings - Fork 103
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
Auth for exporting traces #1226
Auth for exporting traces #1226
Conversation
…ken on trace export
type clientAuthenticator struct { | ||
token string | ||
} |
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.
This makes sense to me, but I think it would benefit from the addition of SetNewToken(token string)
That would allow the token to be updated, without create a new exporter.
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 suspect it would be super clean to create one, and register it with knapsack.RegisterChangeObserver
Maybe pull that into New(k knapsack)
? Not sure...
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.
Yes, definitely cleaner! I'll update
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.
This is updated -- I ended up making TraceExporter
subscribe to the ingest
updates, and swap in the token when pinged.
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.
nice!
31d1d55
to
3d72ca1
Compare
0a1059b
to
d6e025e
Compare
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.
awesome sauce
Adds a gRPC wrapper that adds a bearer auth header to all outgoing trace exports. Also allows the ingest server URL and the export traces flag to be set by the control server.