Add ability for the opamp client to use the x-sf-token header#2934
Add ability for the opamp client to use the x-sf-token header#2934breedx-splk wants to merge 3 commits into
Conversation
|
Are you going to add |
Why, does |
|
|
| return OpampClientConfiguration.builder() | ||
| .withEnabled(config.getBoolean("splunk.opamp.enabled", false)) | ||
| .withEndpoint(config.getString("splunk.opamp.endpoint")) | ||
| .withAccessToken(config.getString(SPLUNK_ACCESS_TOKEN)) |
There was a problem hiding this comment.
We should either use constants in all places here, or just a plain strings. This constant is not used anywhere else, so to me it is not worth making this class bigger by adding a constant.
There was a problem hiding this comment.
That constant is used in a few other places. I prefer using existing constants over duplicating string literals, which is prone to creating inconsistencies. I didn't create constants for the OTHER string key literals because they are only used here.
If the opamp client is to be used without a collector, then it will need the ability to set the token header.