-
Notifications
You must be signed in to change notification settings - Fork 227
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
Collect cloud metadata #1815
Comments
How would someone go about implementing this? From what I can see the metadata itself will need to be added to apm-agent-nodejs/lib/config.js Lines 239 to 249 in cde2dde
But the biggest "issue" so far, is that the config generation is synchronous. A possible solution to the above that does not require a big refactor would be to create the "cloud metadata fetcher" as a function that accepts a callback and then pass that to Something like:
|
That sounds like a good plan and is in line with what the spec says:
Any events that are created before the metadata is ready would be buffered in the meantime. |
I've started working on this at #1816 |
* feat: docs for cloud provider configuration * Update docs/configuration.asciidoc * Implements #1815 Co-authored-by: Brandon Morelli <[email protected]> Co-authored-by: Brandon Morelli <[email protected]>
* Implements: elastic/apm-agent-nodejs#1815 * chore: save progress * feat: moving encoded metadata setting to constructor * feat: "rough draft" of a working PR * chore: rename to updateEncodedMetadata * fix: attach metadata to correct spot * chore: rewrite comment * chore: async all the things * test: tests for new client methods * feat: update event name to reflect intent * chore: lint and proofread * chore: move tests to existing suite to avoid argv process weirdness in jenkins * chore: change from function to object * test: change from function to object method * chore: lint * chore: reunite comment with its line * chore: err not error * chore: remove old comment * chore: unasync a function
* Implements: #1815 * feat: cloud metadata request * chore: move test file * feat: test complete * feat: working through test failures * fix: tests * chore: re-org * feat: reorg metadata * chore: undo test removal * chore: remove console.log * feat: request module * chore: moving on up * chore: instrumentation path * chore: bringing over test server fixtures from other branch * chore: lint cleanup post-elrequest * fix: failure handlers for request * chore: lint * feat: add cli interface for quick testing on cloud servers * chore: exit codes for cli * feat: fetch metadata for all, corrdinate messages * feat: error handling for non-json responses * feat: adding agent configuration of cloud provider and tests for same * chore: module constants for timeouts * ci: new test server endpoint for v2 amazon * feat: add v2 server tests and implementation * fix: error handling * chore: lint * test: full testing of unexpected responses from metadata server * chore: lint * test: tests for coordination object * chore: rename to CallbackCoordination * chore: rename library file * fix: cleanup timeout in coordination * chore: lint * fix: better pattern for no double callbacks on errors * feat: logging, comment proofread * feat: APM Server wants strings for everything, add type casting/checking * chore: fix port * chore: lint * chore: changelog * chore: adjust log level * chore: add link to issue * chore: nits -- variable name and error type export * chore: lint, remove unused data * fix: better pattern for request callback * chore: variable rename * chore: change from passing entire agent to just passing provider name * chore: use logger arg instead of global agent instance * chore: for loop style * chore: cast with string objects instead of concats * chore: not new String, String * chore: lint * chore: logger into other tests * chore: more getLogger calls * chore: lint * feat: unified IMDSv1 and IMDSv2 method * feat: unify aws APIs * fix: avoid catching the callback's exceptions * fix: removes instances of "callback function in a try" anti-pattern * feat: refactor to use URLs, move constants into modules * fix: 32 is not x32 * chore: lint * fix: node 8 and URL * feat: config normalization and testing * feat: improve API of getMetadata... methods, baseApiOverride param * fix: log a "shouldn't happen" situation * chore: update comments * chore: err vs. error * chore: no-op logger * chore: one last logger * chore: lint * chore: module path
With #1937 and elastic/apm-nodejs-http-client#129 landed this work is done, and we be available after the next http client and agent release. |
see elastic/apm#290
see also current spec doc: https://github.com/elastic/apm/blob/3f224a9cbacb196bbb196b0868d9fa90a0bbaf6c/specs/agents/metadata.md#cloud-provider-metadata
The text was updated successfully, but these errors were encountered: