Skip to content

Commit

Permalink
Merge branch 'main' into registry-updates-2407-2
Browse files Browse the repository at this point in the history
  • Loading branch information
svrnm authored Jul 22, 2024
2 parents 998f649 + a2e600f commit 9529fff
Show file tree
Hide file tree
Showing 227 changed files with 1,289 additions and 857 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[submodule "content-modules/opentelemetry-specification"]
path = content-modules/opentelemetry-specification
url = https://github.com/open-telemetry/opentelemetry-specification.git
spec-pin = v1.34.0
spec-pin = v1.35.0
[submodule "content-modules/community"]
path = content-modules/community
url = https://github.com/open-telemetry/community
Expand Down
2 changes: 1 addition & 1 deletion content/en/blog/2022/debug-otel-with-otel/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,5 +260,5 @@ COPY opentelemetry_module.conf /etc/nginx/conf.d
[v1.0.1 release of the otel-webserver-module]:
https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.1
[java]:
/docs/zero-code/java/agent/configuration/#capturing-http-request-and-response-headers
/docs/zero-code/java/agent/instrumentation/http/#capturing-http-request-and-response-headers
[python]: /docs/zero-code/python/
4 changes: 0 additions & 4 deletions content/en/blog/2024/otel-errors/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,6 @@ message embedded within a span. Span events help enhance spans by providing
descriptive information about a span.
[Span events can also have attributes of their own](/docs/languages/ruby/instrumentation/#add-span-events).

When a span status is set to `Error`, a span event is created automatically,
capturing the span’s resulting error message and stack trace as an event on that
span. You can further enhance this span error by adding attributes to it.

Earlier, we mentioned a method called `RecordException`. Per
[the spec](/docs/specs/otel/trace/api/#record-exception) (emphasis our own), “To
facilitate recording an exception languages SHOULD provide a RecordException
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/collector/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Collector
description: Vendor-agnostic way to receive, process and export telemetry data.
aliases: [collector/about]
cascade:
vers: 0.104.0
vers: 0.105.0
weight: 270
---

Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/collector/custom-collector.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ your components.
Further reading:

- [Building a Trace Receiver](/docs/collector/building/receiver)
- [Building a Connector](/docs/collector/building/receiver)
- [Building a Connector](/docs/collector/building/connector)

[ocb]:
https://github.com/open-telemetry/opentelemetry-collector/tree/main/cmd/builder
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/collector/internal-telemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ categorized by instrumentation type.

| Metric name | Description | Type |
| ------------------------------------------------------ | --------------------------------------------------------------------------------------- | --------- |
| `otelcol_exporter_enqueue_failed_`<br>`log_records` | Number of spans that exporter(s) failed to enqueue. | Counter |
| `otelcol_exporter_enqueue_failed_`<br>`log_records` | Number of logs that exporter(s) failed to enqueue. | Counter |
| `otelcol_exporter_enqueue_failed_`<br>`metric_points` | Number of metric points that exporter(s) failed to enqueue. | Counter |
| `otelcol_exporter_enqueue_failed_`<br>`spans` | Number of spans that exporter(s) failed to enqueue. | Counter |
| `otelcol_exporter_queue_capacity` | Fixed capacity of the retry queue, in batches. | Gauge |
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/faas/lambda-auto-instrument.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ variables:
instrumentations, see [Suppressing specific agent instrumentation][1].

[1]:
/docs/zero-code/java/agent/configuration/#suppressing-specific-agent-instrumentation
/docs/zero-code/java/agent/disable/#suppressing-specific-agent-instrumentation

For example, to only enable auto-instrumentation for Lambda and the AWS SDK, you
would set the following environment variables:
Expand Down
4 changes: 2 additions & 2 deletions content/en/docs/kubernetes/operator/automatic.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ Therefore, the example uses `http://demo-collector:4318`, which connects to the
#### Excluding auto-instrumentation {#java-excluding-auto-instrumentation}

By default, the Java auto-instrumentation ships with
[many instrumentation libraries](/docs/zero-code/java/agent/#supported-libraries-frameworks-application-services-and-jvms).
[many instrumentation libraries](/docs/zero-code/java/agent/getting-started/#supported-libraries-frameworks-application-services-and-jvms).
This makes instrumentation easy, but could result in too much or unwanted data.
If there are any libraries you do not want to use you can set the
`OTEL_INSTRUMENTATION_[NAME]_ENABLED=false` where `[NAME]` is the name of the
Expand All @@ -221,7 +221,7 @@ the default libraries by setting
`OTEL_INSTRUMENTATION_COMMON_DEFAULT_ENABLED=false` and then use
`OTEL_INSTRUMENTATION_[NAME]_ENABLED=true` where `[NAME]` is the name of the
library. For more details, see
[Suppressing specific instrumentation](/docs/zero-code/java/agent/configuration/#suppressing-specific-instrumentation).
[Suppressing specific instrumentation](/docs/zero-code/java/agent/disable/).

```yaml
apiVersion: opentelemetry.io/v1alpha1
Expand Down
3 changes: 1 addition & 2 deletions content/en/docs/languages/go/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ go get "go.opentelemetry.io/otel" \
"go.opentelemetry.io/otel/sdk/metric" \
"go.opentelemetry.io/otel/sdk/resource" \
"go.opentelemetry.io/otel/sdk/trace" \
"go.opentelemetry.io/otel/semconv/v1.24.0" \
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"\
"go.opentelemetry.io/contrib/bridges/otelslog"
```
Expand Down Expand Up @@ -391,7 +390,7 @@ import (
"go.opentelemetry.io/otel/metric"
)

const name = "rolldice"
const name = "go.opentelemetry.io/otel/example/dice"

var (
tracer = otel.Tracer(name)
Expand Down
50 changes: 38 additions & 12 deletions content/en/docs/languages/go/instrumentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import (
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.21.0"
semconv "go.opentelemetry.io/otel/semconv/v1.26.0"
"go.opentelemetry.io/otel/trace"
)

Expand Down Expand Up @@ -86,7 +86,7 @@ func main() {
otel.SetTracerProvider(tp)

// Finally, set the tracer that can be used for this package.
tracer = tp.Tracer("ExampleService")
tracer = tp.Tracer("example.io/package/name")
}
```

Expand Down Expand Up @@ -187,7 +187,7 @@ span.SetAttributes(myKey.String("a value"))
Semantic Attributes are attributes that are defined by the [OpenTelemetry
Specification][] in order to provide a shared set of attribute keys across multiple
languages, frameworks, and runtimes for common concepts like HTTP methods, status
codes, user agents, and more. These attributes are available in the `go.opentelemetry.io/otel/semconv/v1.21.0`
codes, user agents, and more. These attributes are available in the `go.opentelemetry.io/otel/semconv/v1.26.0`
package.

For details, see [Trace semantic conventions][].
Expand Down Expand Up @@ -364,7 +364,7 @@ import (
"go.opentelemetry.io/otel/exporters/stdout/stdoutmetric"
"go.opentelemetry.io/otel/sdk/metric"
"go.opentelemetry.io/otel/sdk/resource"
semconv "go.opentelemetry.io/otel/semconv/v1.21.0"
semconv "go.opentelemetry.io/otel/semconv/v1.26.0"
)

func main() {
Expand Down Expand Up @@ -432,7 +432,7 @@ acquire a meter. For example:
```go
import "go.opentelemetry.io/otel"

var meter = otel.Meter("my-service-meter")
var meter = otel.Meter("example.io/package/name")
```

### Synchronous and asynchronous instruments
Expand Down Expand Up @@ -547,6 +547,8 @@ import (
"go.opentelemetry.io/otel/metric"
)

var fanSpeedSubscription chan int64

func init() {
speedGauge, err := meter.Int64Gauge(
"cpu.fan.speed",
Expand All @@ -556,10 +558,32 @@ func init() {
if err != nil {
panic(err)
}
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
// hard-code 1500 RPM for demonstrative purposes
speedGauge.Record(r.Context(), 1500)
})

getCPUFanSpeed := func() int64 {
// Generates a random fan speed for demonstration purpose.
// In real world applications, replace this to get the actual fan speed.
return int64(1500 + rand.Intn(1000))
}

fanSpeedSubscription = make(chan int64, 1)
go func() {
defer close(fanSpeedSubscription)

for idx := 0; idx < 5; idx++ {
// Synchronous gauges are used when the measurement cycle is
// synchronous to an external change.
time.Sleep(time.Duration(rand.Intn(3)) * time.Second)
fanSpeed := getCPUFanSpeed()
fanSpeedSubscription <- fanSpeed
}
}()
}

func recordFanSpeed() {
ctx := context.Background()
for fanSpeed := range fanSpeedSubscription {
speedGauge.Record(ctx, fanSpeed)
}
}
```

Expand Down Expand Up @@ -729,7 +753,7 @@ import (
"net/http"

"go.opentelemetry.io/otel/metric"
semconv "go.opentelemetry.io/otel/semconv/v1.21.0"
semconv "go.opentelemetry.io/otel/semconv/v1.26.0"
)

func init() {
Expand All @@ -745,7 +769,7 @@ func init() {
// do some work in an API call and set the response HTTP status code

apiCounter.Add(r.Context(), 1,
metric.WithAttributes(semconv.HTTPStatusCode(statusCode)))
metric.WithAttributes(semconv.HTTPResponseStatusCode(statusCode)))
})
}
```
Expand Down Expand Up @@ -977,7 +1001,7 @@ import (
"go.opentelemetry.io/otel/log/global"
"go.opentelemetry.io/otel/sdk/log"
"go.opentelemetry.io/otel/sdk/resource"
semconv "go.opentelemetry.io/otel/semconv/v1.21.0"
semconv "go.opentelemetry.io/otel/semconv/v1.26.0"
)

func main() {
Expand Down Expand Up @@ -1044,6 +1068,7 @@ packages:

- [logrus bridge][otellogrus]
- [slog bridge][otelslog]
- [zap bridge][otelzap]

The links above contain full usage and installation documentation.

Expand Down Expand Up @@ -1075,6 +1100,7 @@ telemetry backends.
[log data model]: /docs/specs/otel/logs/data-model
[otellogrus]: https://pkg.go.dev/go.opentelemetry.io/contrib/bridges/otellogrus
[otelslog]: https://pkg.go.dev/go.opentelemetry.io/contrib/bridges/otelslog
[otelzap]: https://pkg.go.dev/go.opentelemetry.io/contrib/bridges/otelzap
[`go.opentelemetry.io/otel`]: https://pkg.go.dev/go.opentelemetry.io/otel
[`go.opentelemetry.io/otel/exporters/stdout/stdoutmetric`]:
https://pkg.go.dev/go.opentelemetry.io/otel/exporters/stdout/stdoutmetric
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/languages/java/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: >-
aliases: [/java, /java/metrics, /java/tracing]
cascade:
vers:
instrumentation: 2.5.0
instrumentation: 2.6.0
otel: 1.40.0
semconv: 1.26.0
weight: 18
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/languages/java/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ For more:
[metrics]: /docs/concepts/signals/metrics/
[logs]: /docs/concepts/signals/logs/
[annotations]: /docs/zero-code/java/agent/annotations/
[configure the java agent]: /docs/zero-code/java/agent/#configuring-the-agent
[configure the java agent]: /docs/zero-code/java/agent/configuration/
[console exporter]:
https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md#logging-exporter
[exporter]:
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/languages/java/libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ in order to generate telemetry data for a library or framework.
The Java agent for automatic instrumentation includes instrumentation libraries
for many common Java frameworks. Most are turned on by default. If you need to
turn off certain instrumentation libraries, you can
[suppress them](/docs/zero-code/java/agent/configuration/#suppressing-specific-instrumentation).
[suppress them](/docs/zero-code/java/agent/disable/).

If you use [code-based instrumentation](../instrumentation), you can leverage
some instrumentation libraries for your dependencies standalone. To find out
Expand Down
Loading

0 comments on commit 9529fff

Please sign in to comment.