Skip to content

[pt] Update content/pt/docs/languages/go/getting-started.md - #12331

Open
vitorvasc wants to merge 1 commit into
open-telemetry:mainfrom
vitorvasc:pt_update_languages-go-getting-started
Open

vitorvasc wants to merge 1 commit into
open-telemetry:mainfrom
vitorvasc:pt_update_languages-go-getting-started

Conversation

@vitorvasc

Copy link
Copy Markdown
Member
  • I have read and followed the Contributing docs, especially the "First-time contributing?" section.
  • This PR has content that I did not fully write myself.
  • I have the experience and knowledge necessary to understand, review, and validate all content in this PR.1

Contributes to #11557.

  • Resync the page with English: new title and description, > [!NOTE], removed "Add dependencies" section, expanded main.go and rolldice.go starter code, and updated code samples and outputs
  • Add the new autoexport tip
  • Fix the heading ID to #add-opentelemetry-instrumentation
  • Point code-excerpt path-base to content-modules/opentelemetry-go-contrib/examples/dice/instrumented, following Drop the examples/ folder of symlinks into submodules #12157
  • Bump default_lang_commit and drop # patched and drifted_from_default
> check:i18n
> node scripts/i18n/drift.mjs diff content/pt/docs/languages/go/getting-started.md
# content/pt/docs/languages/go/getting-started.md: drifted from 505e2d1d650a80f8a8d72206f2e285430bc6b36a
diff --git a/content/en/docs/languages/go/getting-started.md b/content/en/docs/languages/go/getting-started.md
index e355f8804..62fff0ad9 100644
--- a/content/en/docs/languages/go/getting-started.md
+++ b/content/en/docs/languages/go/getting-started.md
@@ -1,24 +1,23 @@
 ---
-title: Getting Started
+title: Getting Started by Example
+description: Get telemetry for your app in less than 5 minutes!
 weight: 10
 # prettier-ignore
-cSpell:ignore: chan fatalln funcs intn itoa khtml otelhttp rolldice stdouttrace strconv
+cSpell:ignore: autoexport chan fatalln funcs intn itoa otelhttp rolldice stdouttrace strconv
 ---
 
 <!-- markdownlint-disable blanks-around-fences -->
-<?code-excerpt path-base="examples/go/dice"?>
+<?code-excerpt path-base="content-modules/opentelemetry-go-contrib/examples/dice/instrumented"?>
 
 This page will show you how to get started with OpenTelemetry in Go.
 
 You will learn how you can instrument a simple application manually, in such a
 way that [traces][], [metrics][], and [logs][] are emitted to the console.
 
-{{% alert title="Note" %}}
-
-The logs signal is still experimental. Breaking changes may be introduced in
-future versions.
-
-{{% /alert %}}
+> [!NOTE]
+>
+> The logs signal is still experimental. Breaking changes may be introduced in
+> future versions.
 
 ## Prerequisites
 
@@ -53,14 +52,64 @@ to the file:
 package main
 
 import (
+	"context"
 	"log"
+	"net"
 	"net/http"
+	"os"
+	"os/signal"
+	"time"
 )
 
 func main() {
-	http.HandleFunc("/rolldice", rolldice)
+	if err := run(); err != nil {
+		log.Fatalln(err)
+	}
+}
+
+func run() (err error) {
+	// Handle SIGINT (CTRL+C) gracefully.
+	ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
+	defer stop()
+
+	// Start HTTP server.
+	srv := &http.Server{
+		Addr:         ":8080",
+		BaseContext:  func(net.Listener) context.Context { return ctx },
+		ReadTimeout:  time.Second,
+		WriteTimeout: 10 * time.Second,
+		Handler:      newHTTPHandler(),
+	}
+	srvErr := make(chan error, 1)
+	go func() {
+		log.Println("Running HTTP server...")
+		srvErr <- srv.ListenAndServe()
+	}()
+
+	// Wait for interruption.
+	select {
+	case err = <-srvErr:
+		// Error when starting HTTP server.
+		return err
+	case <-ctx.Done():
+		// Wait for first CTRL+C.
+		// Stop receiving signal notifications as soon as possible.
+		stop()
+	}
 
-	log.Fatal(http.ListenAndServe(":8080", nil))
+	// When Shutdown is called, ListenAndServe immediately returns ErrServerClosed.
+	err = srv.Shutdown(context.Background())
+	return err
+}
+
+func newHTTPHandler() http.Handler {
+	mux := http.NewServeMux()
+
+	// Register handlers.
+	mux.HandleFunc("/rolldice/", rolldice)
+	mux.HandleFunc("/rolldice/{player}", rolldice)
+
+	return mux
 }
 ```
 
@@ -80,9 +129,17 @@ import (
 func rolldice(w http.ResponseWriter, r *http.Request) {
 	roll := 1 + rand.Intn(6)
 
+	var msg string
+	if player := r.PathValue("player"); player != "" {
+		msg = player + " is rolling the dice"
+	} else {
+		msg = "Anonymous player is rolling the dice"
+	}
+	log.Printf("%s, result: %d", msg, roll)
+
 	resp := strconv.Itoa(roll) + "\n"
 	if _, err := io.WriteString(w, resp); err != nil {
-		log.Printf("Write failed: %v\n", err)
+		log.Printf("Write failed: %v", err)
 	}
 }
 ```
@@ -102,31 +159,6 @@ Now we'll show how to add OpenTelemetry instrumentation to the sample app. If
 you are using your own application, you can follow along, just note that your
 code may be slightly different.
 
-### Add Dependencies
-
-Install the following packages:
-
-```shell
-go get "go.opentelemetry.io/otel" \
-  "go.opentelemetry.io/otel/exporters/stdout/stdoutmetric" \
-  "go.opentelemetry.io/otel/exporters/stdout/stdouttrace" \
-  "go.opentelemetry.io/otel/exporters/stdout/stdoutlog" \
-  "go.opentelemetry.io/otel/sdk/log" \
-  "go.opentelemetry.io/otel/log/global" \
-  "go.opentelemetry.io/otel/propagation" \
-  "go.opentelemetry.io/otel/sdk/metric" \
-  "go.opentelemetry.io/otel/sdk/resource" \
-  "go.opentelemetry.io/otel/sdk/trace" \
-  "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"\
-  "go.opentelemetry.io/contrib/bridges/otelslog"
-```
-
-This installs OpenTelemetry SDK components and `net/http` instrumentation.
-
-If you're instrumenting a different library for network requests, you'll need to
-install the appropriate instrumentation library. See
-[libraries](/docs/languages/go/libraries/) for more info.
-
 ### Initialize the OpenTelemetry SDK
 
 First, we'll initialize the OpenTelemetry SDK. This is _required_ for any
@@ -220,8 +252,7 @@ func newPropagator() propagation.TextMapPropagator {
 }
 
 func newTracerProvider() (*trace.TracerProvider, error) {
-	traceExporter, err := stdouttrace.New(
-		stdouttrace.WithPrettyPrint())
+	traceExporter, err := stdouttrace.New(stdouttrace.WithPrettyPrint())
 	if err != nil {
 		return nil, err
 	}
@@ -235,7 +266,7 @@ func newTracerProvider() (*trace.TracerProvider, error) {
 }
 
 func newMeterProvider() (*metric.MeterProvider, error) {
-	metricExporter, err := stdoutmetric.New()
+	metricExporter, err := stdoutmetric.New(stdoutmetric.WithPrettyPrint())
 	if err != nil {
 		return nil, err
 	}
@@ -249,7 +280,7 @@ func newMeterProvider() (*metric.MeterProvider, error) {
 }
 
 func newLoggerProvider() (*log.LoggerProvider, error) {
-	logExporter, err := stdoutlog.New()
+	logExporter, err := stdoutlog.New(stdoutlog.WithPrettyPrint())
 	if err != nil {
 		return nil, err
 	}
@@ -262,6 +293,16 @@ func newLoggerProvider() (*log.LoggerProvider, error) {
 ```
 <!-- prettier-ignore-end -->
 
+> [!TIP]
+>
+> The previous example uses console (stdout) exporters for demonstration. You
+> can use the
+> [`autoexport`](https://pkg.go.dev/go.opentelemetry.io/contrib/exporters/autoexport)
+> package to configure exporters via environment variables such as
+> `OTEL_TRACES_EXPORTER`, `OTEL_METRICS_EXPORTER`, `OTEL_LOGS_EXPORTER`, and
+> `OTEL_EXPORTER_OTLP_ENDPOINT`. See [Exporters](/docs/languages/go/exporters/)
+> for details.
+
 If you're only using tracing or metrics, you can omit the corresponding
 TracerProvider or MeterProvider initialization code.
 
@@ -315,7 +356,7 @@ func run() error {
 	// Start HTTP server.
 	srv := &http.Server{
 		Addr:         ":8080",
-		BaseContext:  func(_ net.Listener) context.Context { return ctx },
+		BaseContext:  func(net.Listener) context.Context { return ctx },
 		ReadTimeout:  time.Second,
 		WriteTimeout: 10 * time.Second,
 		Handler:      newHTTPHandler(),
@@ -345,8 +386,8 @@ func newHTTPHandler() http.Handler {
 	mux := http.NewServeMux()
 
 	// Register handlers.
-	mux.Handle("/rolldice/", rolldice)
-	mux.Handle("/rolldice/{player}", rolldice)
+	mux.Handle("/rolldice", http.HandlerFunc(rolldice))
+	mux.Handle("/rolldice/{player}", http.HandlerFunc(rolldice))
 
 	// Add HTTP instrumentation for the whole server.
 	handler := otelhttp.NewHandler(mux, "/")
@@ -370,25 +411,24 @@ Modify `rolldice.go` to include custom instrumentation using OpenTelemetry API:
 package main
 
 import (
-	"fmt"
 	"io"
-	"log"
 	"math/rand"
 	"net/http"
 	"strconv"
 
-	"go.opentelemetry.io/contrib/bridges/otelslog"
 	"go.opentelemetry.io/otel"
 	"go.opentelemetry.io/otel/attribute"
 	"go.opentelemetry.io/otel/metric"
+
+	"go.opentelemetry.io/contrib/bridges/otelslog"
 )
 
-const name = "go.opentelemetry.io/otel/example/dice"
+const name = "go.opentelemetry.io/contrib/examples/dice"
 
 var (
-	tracer = otel.Tracer(name)
-	meter  = otel.Meter(name)
-	logger = otelslog.NewLogger(name)
+	tracer  = otel.Tracer(name)
+	meter   = otel.Meter(name)
+	logger  = otelslog.NewLogger(name)
 	rollCnt metric.Int64Counter
 )
 
@@ -410,7 +450,7 @@ func rolldice(w http.ResponseWriter, r *http.Request) {
 
 	var msg string
 	if player := r.PathValue("player"); player != "" {
-		msg = fmt.Sprintf("%s is rolling the dice", player)
+		msg = player + " is rolling the dice"
 	} else {
 		msg = "Anonymous player is rolling the dice"
 	}
@@ -422,7 +462,7 @@ func rolldice(w http.ResponseWriter, r *http.Request) {
 
 	resp := strconv.Itoa(roll) + "\n"
 	if _, err := io.WriteString(w, resp); err != nil {
-		log.Printf("Write failed: %v\n", err)
+		logger.ErrorContext(ctx, "Write failed", "error", err)
 	}
 }
 ```
@@ -454,28 +494,28 @@ manually and it is a child of the previously mentioned span.
 {
 	"Name": "roll",
 	"SpanContext": {
-		"TraceID": "829fb7ceb787403c96eac3caf285c965",
-		"SpanID": "8b6b408b6c1a35e5",
+		"TraceID": "f00f8045a6c78b3aa5ecaca9f3b971b4",
+		"SpanID": "f641bd25400a1b70",
 		"TraceFlags": "01",
 		"TraceState": "",
 		"Remote": false
 	},
 	"Parent": {
-		"TraceID": "829fb7ceb787403c96eac3caf285c965",
-		"SpanID": "612be4bbdf450de6",
+		"TraceID": "f00f8045a6c78b3aa5ecaca9f3b971b4",
+		"SpanID": "a10f1d2ca2f685c9",
 		"TraceFlags": "01",
 		"TraceState": "",
 		"Remote": false
 	},
 	"SpanKind": 1,
-	"StartTime": "2023-09-25T12:42:06.177119576+02:00",
-	"EndTime": "2023-09-25T12:42:06.177136776+02:00",
+	"StartTime": "2026-01-28T09:58:44.298985982+01:00",
+	"EndTime": "2026-01-28T09:58:44.299067482+01:00",
 	"Attributes": [
 		{
 			"Key": "roll.value",
 			"Value": {
 				"Type": "INT64",
-				"Value": 6
+				"Value": 1
 			}
 		}
 	],
@@ -522,21 +562,28 @@ manually and it is a child of the previously mentioned span.
 			"Key": "telemetry.sdk.version",
 			"Value": {
 				"Type": "STRING",
-				"Value": "1.19.0-rc.1"
+				"Value": "1.39.0"
 			}
 		}
 	],
+	"InstrumentationScope": {
+		"Name": "go.opentelemetry.io/contrib/examples/dice",
+		"Version": "",
+		"SchemaURL": "",
+		"Attributes": null
+	},
 	"InstrumentationLibrary": {
-		"Name": "rolldice",
+		"Name": "go.opentelemetry.io/contrib/examples/dice",
 		"Version": "",
-		"SchemaURL": ""
+		"SchemaURL": "",
+		"Attributes": null
 	}
 }
 {
 	"Name": "/",
 	"SpanContext": {
-		"TraceID": "829fb7ceb787403c96eac3caf285c965",
-		"SpanID": "612be4bbdf450de6",
+		"TraceID": "f00f8045a6c78b3aa5ecaca9f3b971b4",
+		"SpanID": "a10f1d2ca2f685c9",
 		"TraceFlags": "01",
 		"TraceState": "",
 		"Remote": false
@@ -549,81 +596,88 @@ manually and it is a child of the previously mentioned span.
 		"Remote": false
 	},
 	"SpanKind": 2,
-	"StartTime": "2023-09-25T12:42:06.177071077+02:00",
-	"EndTime": "2023-09-25T12:42:06.177158076+02:00",
+	"StartTime": "2026-01-28T09:58:44.298951202+01:00",
+	"EndTime": "2026-01-28T09:58:44.299109293+01:00",
 	"Attributes": [
 		{
-			"Key": "http.method",
+			"Key": "server.address",
+			"Value": {
+				"Type": "STRING",
+				"Value": "localhost"
+			}
+		},
+		{
+			"Key": "http.request.method",
 			"Value": {
 				"Type": "STRING",
 				"Value": "GET"
 			}
 		},
 		{
-			"Key": "http.scheme",
+			"Key": "url.scheme",
 			"Value": {
 				"Type": "STRING",
 				"Value": "http"
 			}
 		},
 		{
-			"Key": "http.flavor",
+			"Key": "server.port",
 			"Value": {
-				"Type": "STRING",
-				"Value": "1.1"
+				"Type": "INT64",
+				"Value": 8080
 			}
 		},
 		{
-			"Key": "net.host.name",
+			"Key": "network.peer.address",
 			"Value": {
 				"Type": "STRING",
-				"Value": "localhost"
+				"Value": "127.0.0.1"
 			}
 		},
 		{
-			"Key": "net.host.port",
+			"Key": "network.peer.port",
 			"Value": {
 				"Type": "INT64",
-				"Value": 8080
+				"Value": 43804
 			}
 		},
 		{
-			"Key": "net.sock.peer.addr",
+			"Key": "user_agent.original",
 			"Value": {
 				"Type": "STRING",
-				"Value": "::1"
+				"Value": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:147.0) Gecko/20100101 Firefox/147.0"
 			}
 		},
 		{
-			"Key": "net.sock.peer.port",
+			"Key": "client.address",
 			"Value": {
-				"Type": "INT64",
-				"Value": 49046
+				"Type": "STRING",
+				"Value": "127.0.0.1"
 			}
 		},
 		{
-			"Key": "http.user_agent",
+			"Key": "url.path",
 			"Value": {
 				"Type": "STRING",
-				"Value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36"
+				"Value": "/rolldice/Alice"
 			}
 		},
 		{
-			"Key": "http.route",
+			"Key": "network.protocol.version",
 			"Value": {
 				"Type": "STRING",
-				"Value": "/rolldice/Alice"
+				"Value": "1.1"
 			}
 		},
 		{
-			"Key": "http.wrote_bytes",
+			"Key": "http.response.body.size",
 			"Value": {
 				"Type": "INT64",
 				"Value": 2
 			}
 		},
 		{
-			"Key": "http.status_code",
+			"Key": "http.response.status_code",
 			"Value": {
 				"Type": "INT64",
 				"Value": 200
@@ -673,14 +727,21 @@ manually and it is a child of the previously mentioned span.
 			"Key": "telemetry.sdk.version",
 			"Value": {
 				"Type": "STRING",
-				"Value": "1.19.0-rc.1"
+				"Value": "1.39.0"
 			}
 		}
 	],
+	"InstrumentationScope": {
+		"Name": "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",
+		"Version": "0.64.0",
+		"SchemaURL": "",
+		"Attributes": null
+	},
 	"InstrumentationLibrary": {
 		"Name": "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",
-		"Version": "0.44.0",
-		"SchemaURL": ""
+		"Version": "0.64.0",
+		"SchemaURL": "",
+		"Attributes": null
 	}
 }
 ```
@@ -694,10 +755,10 @@ Along with the trace, log messages are emitted to the console.
 
 ```json
 {
-  "Timestamp": "2023-09-25T12:42:05.177136776+02:00",
-  "ObservedTimestamp": "2023-09-25T12:42:06.809396011+02:00",
+  "Timestamp": "2026-01-28T09:58:44.29900397+01:00",
+  "ObservedTimestamp": "2026-01-28T09:58:44.299031783+01:00",
   "Severity": 9,
-  "SeverityText": "",
+  "SeverityText": "INFO",
   "Body": {
     "Type": "String",
     "Value": "Alice is rolling the dice"
@@ -707,12 +768,12 @@ Along with the trace, log messages are emitted to the console.
       "Key": "result",
       "Value": {
         "Type": "Int64",
-        "Value": 6
+        "Value": 1
       }
     }
   ],
-  "TraceID": "829fb7ceb787403c96eac3caf285c965",
-  "SpanID": "8b6b408b6c1a35e5",
+  "TraceID": "f00f8045a6c78b3aa5ecaca9f3b971b4",
+  "SpanID": "f641bd25400a1b70",
   "TraceFlags": "01",
   "Resource": [
     {
@@ -747,14 +808,15 @@ Along with the trace, log messages are emitted to the console.
       "Key": "telemetry.sdk.version",
       "Value": {
         "Type": "STRING",
-        "Value": "1.19.0-rc.1"
+        "Value": "1.39.0"
       }
     }
   ],
   "Scope": {
-    "Name": "rolldice",
+    "Name": "go.opentelemetry.io/contrib/examples/dice",
     "Version": "",
-    "SchemaURL": ""
+    "SchemaURL": "",
+    "Attributes": {}
   },
   "DroppedAttributes": 0
 }
@@ -806,16 +868,17 @@ the instrumentation library.
       "Key": "telemetry.sdk.version",
       "Value": {
         "Type": "STRING",
-        "Value": "1.19.0-rc.1"
+        "Value": "1.39.0"
       }
     }
   ],
   "ScopeMetrics": [
     {
       "Scope": {
-        "Name": "rolldice",
+        "Name": "go.opentelemetry.io/contrib/examples/dice",
         "Version": "",
-        "SchemaURL": ""
+        "SchemaURL": "",
+        "Attributes": null
       },
       "Metrics": [
         {
@@ -830,27 +893,22 @@ the instrumentation library.
                     "Key": "roll.value",
                     "Value": {
                       "Type": "INT64",
-                      "Value": 1
+                      "Value": 2
                     }
                   }
                 ],
-                "StartTime": "2023-09-25T12:42:04.279204638+02:00",
-                "Time": "2023-09-25T12:42:15.482694258+02:00",
-                "Value": 4
-              },
-              {
-                "Attributes": [
+                "StartTime": "2026-01-28T09:58:36.297218201+01:00",
+                "Time": "2026-01-28T09:59:04.826103626+01:00",
+                "Value": 2,
+                "Exemplars": [
                   {
-                    "Key": "roll.value",
-                    "Value": {
-                      "Type": "INT64",
-                      "Value": 5
-                    }
+                    "FilteredAttributes": null,
+                    "Time": "2026-01-28T09:58:58.310873844+01:00",
+                    "Value": 1,
+                    "SpanID": "MFfLVpcp2E8=",
+                    "TraceID": "KGizZKX5cz9DqgG95WoBvQ=="
                   }
-                ],
-                "StartTime": "2023-09-25T12:42:04.279204638+02:00",
-                "Time": "2023-09-25T12:42:15.482694258+02:00",
-                "Value": 3
+                ]
               },
               {
                 "Attributes": [
@@ -862,23 +920,18 @@ the instrumentation library.
                     }
                   }
                 ],
-                "StartTime": "2023-09-25T12:42:04.279204638+02:00",
-                "Time": "2023-09-25T12:42:15.482694258+02:00",
-                "Value": 4
-              },
-              {
-                "Attributes": [
+                "StartTime": "2026-01-28T09:58:36.297218201+01:00",
+                "Time": "2026-01-28T09:59:04.826103626+01:00",
+                "Value": 1,
+                "Exemplars": [
                   {
-                    "Key": "roll.value",
-                    "Value": {
-                      "Type": "INT64",
-                      "Value": 2
-                    }
+                    "FilteredAttributes": null,
+                    "Time": "2026-01-28T09:58:48.446722639+01:00",
+                    "Value": 1,
+                    "SpanID": "Xa6wKaCre6k=",
+                    "TraceID": "VncSsITnUTtWpMAFGRoLng=="
                   }
-                ],
-                "StartTime": "2023-09-25T12:42:04.279204638+02:00",
-                "Time": "2023-09-25T12:42:15.482694258+02:00",
-                "Value": 2
+                ]
               },
               {
                 "Attributes": [
@@ -886,13 +939,22 @@ the instrumentation library.
                     "Key": "roll.value",
                     "Value": {
                       "Type": "INT64",
-                      "Value": 6
+                      "Value": 1
                     }
                   }
                 ],
-                "StartTime": "2023-09-25T12:42:04.279204638+02:00",
-                "Time": "2023-09-25T12:42:15.482694258+02:00",
-                "Value": 5
+                "StartTime": "2026-01-28T09:58:36.297218201+01:00",
+                "Time": "2026-01-28T09:59:04.826103626+01:00",
+                "Value": 4,
+                "Exemplars": [
+                  {
+                    "FilteredAttributes": null,
+                    "Time": "2026-01-28T09:58:56.340332341+01:00",
+                    "Value": 1,
+                    "SpanID": "RAsXIMJQIcg=",
+                    "TraceID": "NbZh738k1TlZ/I32RuLS/A=="
+                  }
+                ]
               },
               {
                 "Attributes": [
@@ -900,13 +962,22 @@ the instrumentation library.
                     "Key": "roll.value",
                     "Value": {
                       "Type": "INT64",
-                      "Value": 4
+                      "Value": 5
                     }
                   }
                 ],
-                "StartTime": "2023-09-25T12:42:04.279204638+02:00",
-                "Time": "2023-09-25T12:42:15.482694258+02:00",
-                "Value": 9
+                "StartTime": "2026-01-28T09:58:36.297218201+01:00",
+                "Time": "2026-01-28T09:59:04.826103626+01:00",
+                "Value": 1,
+                "Exemplars": [
+                  {
+                    "FilteredAttributes": null,
+                    "Time": "2026-01-28T09:58:55.131367409+01:00",
+                    "Value": 1,
+                    "SpanID": "eVC0Kj4/vzw=",
+                    "TraceID": "NVuservV50eLN7sNu9Sm4A=="
+                  }
+                ]
               }
             ],
             "Temporality": "CumulativeTemporality",
@@ -918,215 +989,259 @@ the instrumentation library.
     {
       "Scope": {
         "Name": "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp",
-        "Version": "0.44.0",
-        "SchemaURL": ""
+        "Version": "0.64.0",
+        "SchemaURL": "",
+        "Attributes": null
       },
       "Metrics": [
         {
-          "Name": "http.server.request_content_length",
-          "Description": "",
-          "Unit": "",
+          "Name": "http.server.request.body.size",
+          "Description": "Size of HTTP server request bodies.",
+          "Unit": "By",
           "Data": {
             "DataPoints": [
               {
                 "Attributes": [
                   {
-                    "Key": "http.flavor",
-                    "Value": {
-                      "Type": "STRING",
-                      "Value": "1.1"
-                    }
-                  },
-                  {
-                    "Key": "http.method",
+                    "Key": "http.request.method",
                     "Value": {
                       "Type": "STRING",
                       "Value": "GET"
                     }
                   },
                   {
-                    "Key": "http.route",
+                    "Key": "http.response.status_code",
                     "Value": {
-                      "Type": "STRING",
-                      "Value": "/rolldice/Alice"
+                      "Type": "INT64",
+                      "Value": 200
                     }
                   },
                   {
-                    "Key": "http.scheme",
+                    "Key": "network.protocol.name",
                     "Value": {
                       "Type": "STRING",
                       "Value": "http"
                     }
                   },
                   {
-                    "Key": "http.status_code",
+                    "Key": "network.protocol.version",
                     "Value": {
-                      "Type": "INT64",
-                      "Value": 200
+                      "Type": "STRING",
+                      "Value": "1.1"
                     }
                   },
                   {
-                    "Key": "net.host.name",
+                    "Key": "server.address",
                     "Value": {
                       "Type": "STRING",
                       "Value": "localhost"
                     }
                   },
                   {
-                    "Key": "net.host.port",
+                    "Key": "server.port",
                     "Value": {
                       "Type": "INT64",
                       "Value": 8080
                     }
+                  },
+                  {
+                    "Key": "url.scheme",
+                    "Value": {
+                      "Type": "STRING",
+                      "Value": "http"
+                    }
                   }
                 ],
-                "StartTime": "2023-09-25T12:42:04.279212238+02:00",
-                "Time": "2023-09-25T12:42:15.482695758+02:00",
-                "Value": 0
+                "StartTime": "2026-01-28T09:58:36.297829232+01:00",
+                "Time": "2026-01-28T09:59:04.82612558+01:00",
+                "Count": 8,
+                "Bounds": [
+                  0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000,
+                  7500, 10000
+                ],
+                "BucketCounts": [
+                  8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+                ],
+                "Min": 0,
+                "Max": 0,
+                "Sum": 0,
+                "Exemplars": [
+                  {
+                    "FilteredAttributes": null,
+                    "Time": "2026-01-28T09:58:58.310903274+01:00",
+                    "Value": 0,
+                    "SpanID": "YQY4fyjDhiQ=",
+                    "TraceID": "KGizZKX5cz9DqgG95WoBvQ=="
+                  }
+                ]
               }
             ],
-            "Temporality": "CumulativeTemporality",
-            "IsMonotonic": true
+            "Temporality": "CumulativeTemporality"
           }
         },
         {
-          "Name": "http.server.response_content_length",
-          "Description": "",
-          "Unit": "",
+          "Name": "http.server.response.body.size",
+          "Description": "Size of HTTP server response bodies.",
+          "Unit": "By",
           "Data": {
             "DataPoints": [
               {
                 "Attributes": [
                   {
-                    "Key": "http.flavor",
-                    "Value": {
-                      "Type": "STRING",
-                      "Value": "1.1"
-                    }
-                  },
-                  {
-                    "Key": "http.method",
+                    "Key": "http.request.method",
                     "Value": {
                       "Type": "STRING",
                       "Value": "GET"
                     }
                   },
                   {
-                    "Key": "http.route",
+                    "Key": "http.response.status_code",
                     "Value": {
-                      "Type": "STRING",
-                      "Value": "/rolldice/Alice"
+                      "Type": "INT64",
+                      "Value": 200
                     }
                   },
                   {
-                    "Key": "http.scheme",
+                    "Key": "network.protocol.name",
                     "Value": {
                       "Type": "STRING",
                       "Value": "http"
                     }
                   },
                   {
-                    "Key": "http.status_code",
+                    "Key": "network.protocol.version",
                     "Value": {
-                      "Type": "INT64",
-                      "Value": 200
+                      "Type": "STRING",
+                      "Value": "1.1"
                     }
                   },
                   {
-                    "Key": "net.host.name",
+                    "Key": "server.address",
                     "Value": {
                       "Type": "STRING",
                       "Value": "localhost"
                     }
                   },
                   {
-                    "Key": "net.host.port",
+                    "Key": "server.port",
                     "Value": {
                       "Type": "INT64",
                       "Value": 8080
                     }
+                  },
+                  {
+                    "Key": "url.scheme",
+                    "Value": {
+                      "Type": "STRING",
+                      "Value": "http"
+                    }
                   }
                 ],
-                "StartTime": "2023-09-25T12:42:04.279214438+02:00",
-                "Time": "2023-09-25T12:42:15.482696158+02:00",
-                "Value": 54
+                "StartTime": "2026-01-28T09:58:36.297836516+01:00",
+                "Time": "2026-01-28T09:59:04.826130841+01:00",
+                "Count": 8,
+                "Bounds": [
+                  0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000,
+                  7500, 10000
+                ],
+                "BucketCounts": [
+                  0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+                ],
+                "Min": 2,
+                "Max": 2,
+                "Sum": 16,
+                "Exemplars": [
+                  {
+                    "FilteredAttributes": null,
+                    "Time": "2026-01-28T09:58:58.310905174+01:00",
+                    "Value": 2,
+                    "SpanID": "YQY4fyjDhiQ=",
+                    "TraceID": "KGizZKX5cz9DqgG95WoBvQ=="
+                  }
+                ]
               }
             ],
-            "Temporality": "CumulativeTemporality",
-            "IsMonotonic": true
+            "Temporality": "CumulativeTemporality"
           }
         },
         {
-          "Name": "http.server.duration",
-          "Description": "",
-          "Unit": "",
+          "Name": "http.server.request.duration",
+          "Description": "Duration of HTTP server requests.",
+          "Unit": "s",
           "Data": {
             "DataPoints": [
               {
                 "Attributes": [
                   {
-                    "Key": "http.flavor",
-                    "Value": {
-                      "Type": "STRING",
-                      "Value": "1.1"
-                    }
-                  },
-                  {
-                    "Key": "http.method",
+                    "Key": "http.request.method",
                     "Value": {
                       "Type": "STRING",
                       "Value": "GET"
                     }
                   },
                   {
-                    "Key": "http.route",
+                    "Key": "http.response.status_code",
                     "Value": {
-                      "Type": "STRING",
-                      "Value": "/rolldice/Alice"
+                      "Type": "INT64",
+                      "Value": 200
                     }
                   },
                   {
-                    "Key": "http.scheme",
+                    "Key": "network.protocol.name",
                     "Value": {
                       "Type": "STRING",
                       "Value": "http"
                     }
                   },
                   {
-                    "Key": "http.status_code",
+                    "Key": "network.protocol.version",
                     "Value": {
-                      "Type": "INT64",
-                      "Value": 200
+                      "Type": "STRING",
+                      "Value": "1.1"
                     }
                   },
                   {
-                    "Key": "net.host.name",
+                    "Key": "server.address",
                     "Value": {
                       "Type": "STRING",
                       "Value": "localhost"
                     }
                   },
                   {
-                    "Key": "net.host.port",
+                    "Key": "server.port",
                     "Value": {
                       "Type": "INT64",
                       "Value": 8080
                     }
+                  },
+                  {
+                    "Key": "url.scheme",
+                    "Value": {
+                      "Type": "STRING",
+                      "Value": "http"
+                    }
                   }
                 ],
-                "StartTime": "2023-09-25T12:42:04.279219438+02:00",
-                "Time": "2023-09-25T12:42:15.482697158+02:00",
-                "Count": 27,
+                "StartTime": "2026-01-28T09:58:36.297850485+01:00",
+                "Time": "2026-01-28T09:59:04.826135353+01:00",
+                "Count": 8,
                 "Bounds": [
-                  0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000,
-                  7500, 10000
-                ],
-                "BucketCounts": [
-                  0, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+                  0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5,
+                  5, 7.5, 10
                 ],
-                "Min": {},
-                "Max": {},
-                "Sum": 2.1752759999999993
+                "BucketCounts": [8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+                "Min": 0.000067593,
+                "Max": 0.000635093,
+                "Sum": 0.001617854,
+                "Exemplars": [
+                  {
+                    "FilteredAttributes": null,
+                    "Time": "2026-01-28T09:58:58.310908469+01:00",
+                    "Value": 0.000197799,
+                    "SpanID": "YQY4fyjDhiQ=",
+                    "TraceID": "KGizZKX5cz9DqgG95WoBvQ=="
+                  }
+                ]
               }
             ],
             "Temporality": "CumulativeTemporality"

Footnotes

  1. Yes, I can answer maintainer questions about the content of this PR, without using AI. ↩

- Resync the starter code, samples and outputs with English
- Add the autoexport tip and convert the note to a blockquote
- Point code-excerpt path-base to content-modules
@vitorvasc
vitorvasc requested a review from a team as a code owner October 23, 2026 12:15
@otelbot-docs otelbot-docs Bot added missing:docs-approval Co-owning SIG has provided approval, PR needs approval from docs maintainer missing:sig-approval Co-owning SIG didn't provide an approval labels Oct 23, 2026
@vitorvasc vitorvasc mentioned this pull request Oct 23, 2026
77 tasks
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Waiting on reviewers · refreshed 2026-10-23 12:21 UTC

Review the latest changes.

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lang:pt missing:docs-approval Co-owning SIG has provided approval, PR needs approval from docs maintainer missing:sig-approval Co-owning SIG didn't provide an approval

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant