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: cli/azd/docs/extension-framework.md
+32-36Lines changed: 32 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -334,42 +334,6 @@ The build process automatically creates binaries for multiple platforms and arch
334
334
> [!NOTE]
335
335
> Build times may vary depending on your hardware and extension complexity.
336
336
337
-
### Distributed Tracing
338
-
339
-
`azd` uses OpenTelemetry and W3C Trace Context for distributed tracing. To ensure your extension's operations are correctly correlated with the parent `azd` process, you must hydrate the context in your extension's entry point.
340
-
341
-
**Update `main.go`:**
342
-
343
-
```go
344
-
import (
345
-
"context"
346
-
"os"
347
-
"github.com/azure/azure-dev/cli/azd/pkg/azdext"
348
-
)
349
-
350
-
funcmain() {
351
-
ctx:= context.Background()
352
-
353
-
// Hydrate context with traceparent from environment if present
354
-
// This ensures the extension process participates in the active trace
Trace context is **automatically propagated** through gRPC messages. The `context.Context` passed to your handlers already contains the trace context from `azd`—no additional setup is required.
1101
+
1102
+
To correlate Azure SDK calls with the parent trace, add the correlation policy to your client options:
`azd` sets this variable when launching extension processes.
1125
+
1130
1126
## Developer Artifacts
1131
1127
1132
1128
`azd` leverages gRPC for the communication protocol between Core `azd` and extensions. gRPC client & server components are automatically generated from profile files.
0 commit comments