Skip to content

feat(opentelemetry-node): support ELASTIC_OTEL_OPAMP_HEADERS#1130

Merged
trentm merged 3 commits intomainfrom
trentm-ELASTIC_OTEL_OPAMP_HEADERS
Nov 1, 2025
Merged

feat(opentelemetry-node): support ELASTIC_OTEL_OPAMP_HEADERS#1130
trentm merged 3 commits intomainfrom
trentm-ELASTIC_OTEL_OPAMP_HEADERS

Conversation

@trentm
Copy link
Copy Markdown
Member

@trentm trentm commented Oct 30, 2025

Typically this is expected to be used for specifying an Authorization header
for the OpAMP endpoint.

Closes: #1069

Typically this is expected to be used for specifying an Authorization header
for the OpAMP endpoint.

Closes: #1069
@trentm trentm self-assigned this Oct 30, 2025
@trentm trentm requested review from a team as code owners October 30, 2025 23:44
@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 30, 2025

@david-luna
Copy link
Copy Markdown
Member

Skipping the 1st test fixture makes the test pass again. So I guess some state remains and affects the failing one.

@david-luna
Copy link
Copy Markdown
Member

david-luna commented Oct 31, 2025

Skipping the 1st test fixture makes the test pass again. So I guess some state remains and affects the failing one.

So it seems we need to call opampServer.testReset() in previous tests (and probably in all of them) to clear up requests and do the assertions only with the right ones.

Before this we were making assertions on OpAMP server requests
before this test case started.
@trentm
Copy link
Copy Markdown
Member Author

trentm commented Oct 31, 2025

So it seems we need to call opampServer.testReset() in previous tests (and probably in all of them)

Yup thanks. I did it just for this one test this time. It will be the only fixture affected because (a) it is the only one using testGetRequests() and testReset() does this currently:

    /**
     * Clear any cached data. This is useful when starting a test.
     */
    testReset() {
        assert.ok(this._testMode, 'must set testMode:true option');
        this._activeAgents.clear();
        this._testRequests = [];
    }

_activeAgents won't affect any of the tests.


There isn't an easy way to run a thing before each of the test fixture tests; no before() or beforeEach() with tape.

@trentm trentm merged commit 040911d into main Nov 1, 2025
13 checks passed
@trentm trentm deleted the trentm-ELASTIC_OTEL_OPAMP_HEADERS branch November 1, 2025 02:39
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.

ELASTIC_OTEL_OPAMP_HEADERS support for OpAMP auth

3 participants