You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: newrelic-opentelemetry-agent-extension/README.md
+40-4Lines changed: 40 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -31,12 +31,48 @@ will need to download the New Relic OpenTelemetry Agent extension, which is publ
31
31
**IMPORTANT**: This package is marked "-alpha". All APIs and behaviors are subject to change. Please use with caution and be sure to check the release notes for
32
32
changes before upgrading.
33
33
34
-
Calls to the [Java agent API](https://docs.newrelic.com/docs/apm/agents/java-agent/api-guides/guide-using-java-agent-api/) API will be routed through the
34
+
See [OpenTelemetry Java Getting started guide](https://docs.newrelic.com/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/get-started/opentelemetry-tutorial-java/)
35
+
for information on configuring the OpenTelemetry Java agent to export to New Relic.
36
+
37
+
## Supported Operations
38
+
39
+
Calls to the [Java agent API](https://docs.newrelic.com/docs/apm/agents/java-agent/api-guides/guide-using-java-agent-api/) will be routed through the
35
40
OpenTelemetry API. Note that many concepts of the New Relic API do not map to an equivalent in the OpenTelemetry API. When an API is called which is not bridged
36
41
to OpenTelemetry, the extension will log details from logger named `com.newrelic.opentelemetry.OpenTelemetryNewRelic` at `FINER` level (if `FINEST` level is
37
42
enabled, a stacktrace to the calling code is included).
38
43
39
-
TODO: add table defining which NewRelic APIs are supported and describe the behavior of each
44
+
The following operations are supported:
40
45
41
-
See [OpenTelemetry Java Getting started guide](https://docs.newrelic.com/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/get-started/opentelemetry-tutorial-java/)
42
-
for information on configuring the OpenTelemetry Java agent to export to New Relic.
46
+
* NewRelic Metric APIs for recording custom timeslice metrics. Record to OpenTelemetry dimensional metrics, where the name of the metric is `newrelic.timeslice.value` for `recordMetric`, `recordResponseTimeMetric`, and `newrelic.timeslice.counter.value` for `incrementCounter`. The name of timeslice metric is set to the value of a dimension on metric with key `metricTimesliceName`.
* NewRelic Error APIs for recording errors. Record the error on whatever OpenTelemetry span is currently active (i.e. `Span.current()`) using `recordException`. Sets the active span status to `ERROR`.
* NewRelic TracedMethod APIs for adding custom attributes. Record the custom attributes to whatever OpenTelemetry span is currently active (i.e. `Span.current()`).
* NewRelic Insights API for recording custom events. Record the event as an OpenTelemetry LogRecord following the [semantic conventions for events](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/events.md). The `event.domain` is set to `newrelic.agent_api`, the `event.name` is set to the name of the custom event.
Copy file name to clipboardExpand all lines: newrelic-opentelemetry-agent-extension/src/main/java/com/newrelic/opentelemetry/OpenTelemetryInsights.java
Copy file name to clipboardExpand all lines: newrelic-opentelemetry-agent-extension/src/main/java/com/newrelic/opentelemetry/OpenTelemetryNewRelic.java
Copy file name to clipboardExpand all lines: newrelic-opentelemetry-agent-extension/src/test/java/com/newrelic/api/agent/opentelemetry/OpenTelemetryInsightsTest.java
0 commit comments