Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
289722f
feat: a proof-of-concept providing an OTel global meter provider usin…
trentm Nov 22, 2022
eb87d72
first otel metrics provider impl (I've only sanity checked Counter us…
trentm Feb 6, 2023
5af565d
Merge branch 'main' into trentm/otel-metrics-poc
trentm Feb 6, 2023
3f5fbf0
cleaning up use case names
trentm Feb 7, 2023
10c9784
drop the PoC dirs of work
trentm Feb 7, 2023
df7b887
initial test case for otel metrics (just the API usage use case, and …
trentm Feb 7, 2023
e8fe3d0
testing tweaks, don't start metrics or register the OTel MeterProvide…
trentm Feb 7, 2023
ba8bc52
rejigger to no longer use otel.metrics.setGlobalMeterProvider()
trentm Feb 8, 2023
f7dcd8b
dump stdout/stderr if this test fails (e.g. on Windows in CI) to try …
trentm Feb 8, 2023
2152d14
fix 'make check'
trentm Feb 8, 2023
16db977
flail debug output to try to grok Windows test failure in Jenkins CI
trentm Feb 9, 2023
cf749b0
test: skip an expectation from exit value of subprocess we are SIGTER…
trentm Feb 9, 2023
e3f2edd
get both use cases from the spec working: instrumenting otel/api or o…
trentm Feb 9, 2023
73aaa4e
fix 'make check'
trentm Feb 9, 2023
3ad752a
lots of improvements to the examples
trentm Feb 10, 2023
6df92f9
test: use undici.request because .fetch is only in Node 16.8+
trentm Feb 10, 2023
f4ba0bb
oh 'make check', I sacrifice these lines for thee
trentm Feb 10, 2023
5955d74
use Delta (for some instrument types) aggregation temporality per our…
trentm Feb 10, 2023
0d98be9
test for aggregation temporality for 'counter'
trentm Feb 10, 2023
0a70604
add observable counter meter type
trentm Mar 7, 2023
ba79d6a
Merge branch 'main' into trentm/otel-metrics-poc
trentm Mar 7, 2023
5a32ed0
use the 'Async ...' instrument naming, as used in the lang-generic OT…
trentm Mar 7, 2023
6025c8c
restore code commented out for dev, fixes 'make check'
trentm Mar 7, 2023
8d5d9f0
add Async Gauge metric type
trentm Mar 8, 2023
4edabbb
updowncounter metric type
trentm Mar 8, 2023
07894bb
turn off dev/debugging ignoring metrics, they are needed for activati…
trentm Mar 8, 2023
015c263
observable UpDownCounter support (modulo possible otel js metrics sdk…
trentm Mar 9, 2023
39a4d25
histograms
trentm Mar 10, 2023
1a1cac2
test handling of attr-sets for separate metricsets
trentm Mar 11, 2023
1d60bc5
labels: drop array-valued attrs and warn; cleaning out XXXs
trentm Mar 28, 2023
cd29e56
agent.flush() on forceFlush or shutdown
trentm Mar 29, 2023
80e082c
an example using the OTel NodeSDK for metrics setup and shutdown
trentm Mar 29, 2023
2651fe0
Merge branch 'main' into trentm/otel-metrics-poc
trentm Apr 3, 2023
05a2320
fix lint; bump to latest otel deps
trentm Apr 3, 2023
a4b09be
sdk-metrics ver guard (v1.11.0); separate metricsets per instrumentat…
trentm Apr 4, 2023
3cb2700
forgot to include this file in previous commit
trentm Apr 4, 2023
b28b182
add the disableMetrics config var and impl it for OTel Metrics and th…
trentm Apr 4, 2023
ecf5ea6
fix lint
trentm Apr 4, 2023
8a5ebb5
test: update mock to have required new method for 'disableMetrics' work
trentm Apr 4, 2023
fab0bad
quick play with Exponential Histograms; warn when we drop a metric of…
trentm Apr 4, 2023
94e141d
drop exporting OTel Metric 'unit'; not in spec, not sure how the valu…
trentm Apr 4, 2023
6eb79f7
otel metrics docs
trentm Apr 7, 2023
fcd7ffb
some tweaks on the docs
trentm Apr 13, 2023
9c8d6a9
doc updates; document customMetricsHistogramBoundaries config var
trentm Apr 13, 2023
9337153
test: add and improve TAV testing of @opentelemetry/api and sdk-metrics
trentm Apr 16, 2023
4e6055d
Merge branch 'main' into trentm/otel-metrics-poc
trentm Apr 17, 2023
56a82c3
update to latest sdk-metrics (v1.12.0); fix 'npm run test:deps' for r…
trentm Apr 17, 2023
9d16af2
fix tests (need lazy 'npm install' now with separate package); add de…
trentm Apr 17, 2023
74c5563
clean up otel metrics examples area
trentm Apr 17, 2023
1cfc4d5
drop the XXX
trentm Apr 17, 2023
1d501d0
flail debugging CI windows failure
trentm Apr 17, 2023
ffd8828
Revert "flail debugging CI windows failure"
trentm Apr 17, 2023
e630cc5
another flail to attempt to avoid spurious test failures on windows
trentm Apr 17, 2023
3feae2b
drop unneeded config object guard (from review feedback)
trentm Apr 27, 2023
0062d04
cleaning up final todos now that the spec is merged
trentm Apr 27, 2023
a474d69
doc, comment, log message improvements/corrections with final review
trentm Apr 28, 2023
751b2e7
Merge branch 'main' into trentm/otel-metrics-poc
trentm Apr 28, 2023
1eb8ba1
changelog entry
trentm Apr 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .ci/tav.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
"@elastic/elasticsearch",
"@elastic/elasticsearch-canary",
"@hapi/hapi",
"@koa/router",
"@opentelemetry/api",
"@opentelemetry/sdk-metrics",
"apollo-server-express",
"aws-sdk",
"bluebird",
"cassandra-driver",
"elasticsearch",
"express",
Expand All @@ -18,25 +17,23 @@
"fastify",
"finalhandler",
"generic-pool",
"got",
"graphql",
"handlebars",
"ioredis",
"knex",
"koa-router",
"memcached",
"mimic-response",
"mongodb",
"mongodb-core",
"mysql",
"mysql2",
"next",
"pg",
"pug",
"redis",
"restify",
"tedious",
"undici",
"ws"
"ws",
"@koa/router,koa-router",
"handlebars,pug",
"bluebird,got,mimic-response"
]
}
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"/.nyc_output",
"/build",
"node_modules",
"elastic-apm-node.js",
"/examples/esbuild/dist",
"/examples/typescript/dist",
"/examples/nextjs",
Expand All @@ -30,6 +31,6 @@
"/test/types/transpile/index.js",
"/test/types/transpile-default/index.js",
"/test_output",
"/tmp"
"tmp"
]
}
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,22 @@ updates:
reviewers:
- "elastic/apm-agent-node-js"

- package-ecosystem: "npm"
directory: "/test/opentelemetry-bridge"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
reviewers:
- "elastic/apm-agent-node-js"

- package-ecosystem: "npm"
directory: "/test/opentelemetry-metrics/fixtures"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
reviewers:
- "elastic/apm-agent-node-js"

- package-ecosystem: "npm"
directory: "/examples/opentelemetry-bridge"
schedule:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/tav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ jobs:
max-parallel: 30
fail-fast: false
matrix:
# A job matrix limit is 256. We do some grouping of TAV modules to
# stay under that limit.
# https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration
node: ${{ fromJSON(needs.prepare-matrix.outputs.versions) }}
module: ${{ fromJSON(needs.prepare-matrix.outputs.modules) }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
/build
node_modules
/test/benchmarks/.tmp
/tmp
tmp
/examples/*/dist
.next
10 changes: 0 additions & 10 deletions .tav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -537,13 +537,3 @@ undici:
commands: node test/instrumentation/modules/undici/undici.test.js
node: '>=14'

"@opentelemetry/api":
versions: '>=1.0.0 <1.5.0'
node: '>=8.0.0'
commands:
- node test/opentelemetry-bridge/OTelBridgeNonRecordingSpan.test.js
- node test/opentelemetry-bridge/OTelBridgeRunContext.test.js
- node test/opentelemetry-bridge/active-span-and-context-interop.test.js
- node test/opentelemetry-bridge/fixtures.test.js
- node test/opentelemetry-bridge/interface-ContextManager.test.js
- node test/opentelemetry-bridge/otel-bridge-feature.test.js
7 changes: 7 additions & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ Notes:
then the Lambda extension will report the failed transaction so it can be
seen in the Kibana APM app. ({pull}3285[#3285])

* Add OpenTelemetry Metrics API and Metrics SDK support. This is currently
experimental and may change. With this change, you may use the OpenTelemetry
Metrics API to create custom metrics and the APM agent will ship those
metrics to APM server. As well, you may use the OpenTelemetry Metrics SDK
and the APM agent will automatically add a MetricReader to ship metrics to
APM server. See the <<opentelemetry-bridge>> for details. ({pull}3152[#3152])

[float]
===== Bug fixes

Expand Down
Loading