@@ -180,6 +180,103 @@ spec:
180
180
181
181
For more details, see [.NET Auto Instrumentation docs](/docs/zero-code/net/).
182
182
183
+ ### Deno
184
+
185
+ The following command creates a basic Instrumentation resource that is
186
+ configured for instrumenting [Deno](https://deno.com) services.
187
+
188
+ ` ` ` bash
189
+ kubectl apply -f - <<EOF
190
+ apiVersion : opentelemetry.io/v1alpha1
191
+ kind : Instrumentation
192
+ metadata :
193
+ name : demo-instrumentation
194
+ spec :
195
+ env :
196
+ - name : OTEL_DENO
197
+ value : ' true'
198
+ exporter :
199
+ endpoint : http://demo-collector:4318
200
+ propagators :
201
+ - tracecontext
202
+ - baggage
203
+ sampler :
204
+ type : parentbased_traceidratio
205
+ argument : ' 1'
206
+ EOF
207
+ ```
208
+
209
+ Deno processes automatically export telemetry data to the configured endpoint
210
+ when they are started with the ` OTEL_DENO=true ` environment variable. Therefore,
211
+ the example specifies this environment variable in the ` env ` field of the
212
+ Instrumentation resource, so it is set for all services that have env vars
213
+ injected with this Instrumentation resource.
214
+
215
+ By default, the Instrumentation resource that auto-instruments Deno services
216
+ uses ` otlp ` with the ` http/proto ` protocol. This means that the configured
217
+ endpoint must be able to receive OTLP over ` http/proto ` . Therefore, the example
218
+ uses ` http://demo-collector:4318 ` , which connects to the ` http/proto ` port of
219
+ the ` otlpreceiver ` of the Collector created in the previous step.
220
+
221
+ {{% alert title="Note" color="info" %}}
222
+
223
+ [ Deno's OpenTelemetry integration] [ deno-otel-docs ] is not yet stable. As a
224
+ result all workloads that want to be instrumented with Deno must have the
225
+ ` --unstable-otel ` flag set when starting the Deno process.
226
+
227
+ {{% /alert %}}
228
+
229
+ #### Configuration options {#deno-configuration-options}
230
+
231
+ By default, the Deno OpenTelemetry integration exports ` console.log() ` output
232
+ as\
233
+ [ logs] ( /docs/concepts/signals/logs/ ) , while still printing the logs to stdout /
234
+ stderr. You can configure these alternative behaviors:
235
+
236
+ - ` OTEL_DENO_CONSOLE=replace ` : only export ` console.log() ` output as logs; do
237
+ not print to stdout / stderr.
238
+ - ` OTEL_DENO_CONSOLE=ignore ` : do not export ` console.log() ` output as logs; do
239
+ print to stdout / stderr.
240
+
241
+ #### Learn more {#deno-learn-more}
242
+
243
+ For more details, see Deno's [ OpenTelemetry integration] [ deno-otel-docs ]
244
+ documentation.
245
+
246
+ [ deno-otel-docs ] : https://docs.deno.com/runtime/fundamentals/open_telemetry/
247
+
248
+ ### Go
249
+
250
+ The following command creates a basic Instrumentation resource that is
251
+ configured specifically for instrumenting Go services.
252
+
253
+ ``` bash
254
+ kubectl apply -f - << EOF
255
+ apiVersion: opentelemetry.io/v1alpha1
256
+ kind: Instrumentation
257
+ metadata:
258
+ name: demo-instrumentation
259
+ spec:
260
+ exporter:
261
+ endpoint: http://demo-collector:4318
262
+ propagators:
263
+ - tracecontext
264
+ - baggage
265
+ sampler:
266
+ type: parentbased_traceidratio
267
+ argument: "1"
268
+ EOF
269
+ ```
270
+
271
+ By default, the Instrumentation resource that auto-instruments Go services uses
272
+ ` otlp ` with the ` http/protobuf ` protocol. This means that the configured
273
+ endpoint must be able to receive OTLP over ` http/protobuf ` . Therefore, the
274
+ example uses ` http://demo-collector:4318 ` , which connects to the ` http/protobuf `
275
+ port of the ` otlpreceiver ` of the Collector created in the previous step.
276
+
277
+ The Go auto-instrumentation does not support disabling any instrumentation.
278
+ [ See the Go Auto-Instrumentation repository for more details.] ( https://github.com/open-telemetry/opentelemetry-go-instrumentation )
279
+
183
280
### Java
184
281
185
282
The following command creates a basic Instrumentation resource that is
@@ -436,38 +533,6 @@ For Python-specific quirks, see
436
533
and the
437
534
[Python agent configuration docs](/docs/zero-code/python/configuration/).
438
535
439
- # ## Go
440
-
441
- The following command creates a basic Instrumentation resource that is
442
- configured specifically for instrumenting Go services.
443
-
444
- ` ` ` bash
445
- kubectl apply -f - <<EOF
446
- apiVersion: opentelemetry.io/v1alpha1
447
- kind: Instrumentation
448
- metadata:
449
- name: demo-instrumentation
450
- spec:
451
- exporter:
452
- endpoint: http://demo-collector:4318
453
- propagators:
454
- - tracecontext
455
- - baggage
456
- sampler:
457
- type: parentbased_traceidratio
458
- argument: "1"
459
- EOF
460
- ` ` `
461
-
462
- By default, the Instrumentation resource that auto-instruments Go services uses
463
- ` otlp` with the `http/protobuf` protocol. This means that the configured
464
- endpoint must be able to receive OTLP over `http/protobuf`. Therefore, the
465
- example uses `http://demo-collector:4318`, which connects to the `http/protobuf`
466
- port of the `otlpreceiver` of the Collector created in the previous step.
467
-
468
- The Go auto-instrumentation does not support disabling any instrumentation.
469
- [See the Go Auto-Instrumentation repository for more details.](https://github.com/open-telemetry/opentelemetry-go-instrumentation)
470
-
471
536
---
472
537
473
538
Now that your Instrumentation object is created, your cluster has the ability to
@@ -483,6 +548,7 @@ done by updating your service’s `spec.template.metadata.annotations` to includ
483
548
a language-specific annotation :
484
549
485
550
- .NET : ` instrumentation.opentelemetry.io/inject-dotnet: "true"`
551
+ - Deno : ` instrumentation.opentelemetry.io/inject-sdk: "true"`
486
552
- Go : ` instrumentation.opentelemetry.io/inject-go: "true"`
487
553
- Java : ` instrumentation.opentelemetry.io/inject-java: "true"`
488
554
- Node.js : ` instrumentation.opentelemetry.io/inject-nodejs: "true"`
@@ -681,10 +747,13 @@ auto-instrumentation annotation.
681
747
682
748
Here are a few things to check for :
683
749
684
- - **Is the auto-instrumentation for the right language?** For example, when
685
- instrumenting a Python application, make sure that the annotation doesn't
686
- incorrectly say `instrumentation.opentelemetry.io/inject-java : " true" `
687
- instead.
750
+ - **Is the auto-instrumentation for the right language?**
751
+ - For example, when instrumenting a Python application, make sure that the
752
+ annotation doesn't incorrectly say
753
+ `instrumentation.opentelemetry.io/inject-java : " true" ` instead.
754
+ - For **Deno**, make sure you are using the
755
+ ` instrumentation.opentelemetry.io/inject-sdk: "true"` annotation, rather
756
+ than an annotation containing the string `deno`.
688
757
- **Is the auto-instrumentation annotation in the correct location?** When
689
758
defining a `Deployment`, annotations can be added in one of two locations :
690
759
` spec.metadata.annotations` , and `spec.template.metadata.annotations`. The
0 commit comments