forked from dapr/dapr
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into grpc-update
- Loading branch information
Showing
15 changed files
with
303 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Dapr 1.9.1 | ||
|
||
### Fixes mDNS name resolver component not working on systems with IPv6 disabled | ||
|
||
#### Problem | ||
|
||
Users running Dapr in self-hosted mode and relying on the mDNS name resolver (the default when not running in Kubernetes) would encounter errors trying to perform service invocation if the system had IPv6 disabled. | ||
|
||
### Impact | ||
|
||
This issue impacts users who are: | ||
|
||
- running Dapr in self-hosted mode, *and* | ||
- using the default mDNS name resolver, *and* | ||
- have disabled IPv6 on the operating system | ||
|
||
#### Root cause | ||
|
||
When initializing a zeroconf (mDNS) client, Dapr required using both IPv4 and IPv6, and failed if either one of the two protocols was disabled on the host system. | ||
|
||
#### Solution | ||
|
||
We have improved error handling so Dapr gracefully falls back to using IPv4 if binding to IPv6 fails. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Dapr 1.9.2 | ||
|
||
### Fixes panics when using pubsub subscriptions or input bindings via gRPC with tracing disabled | ||
|
||
#### Problem | ||
|
||
Users who disabled tracing and are subscribing to Dapr pubsub components via gRPC or using input bindings via gRPC will encounter panics when an event is attempted to be delivered. | ||
|
||
### Impact | ||
|
||
This issue impacts users who: | ||
|
||
- Disabled tracing by setting samplingRate to "0" in Dapr's configuration (by default, the value is "1") | ||
- Use input bindings via gRPC and/or subscribe to pubsub components via gRPC | ||
|
||
#### Root cause | ||
|
||
Dapr 1.9.0 added support for tracing with OpenTelemetry, which uses a new SDK version. During the upgrade, an error was introduced causing a panic when tracing was disabled, due to a missing "nil-check". | ||
|
||
#### Solution | ||
|
||
We have added the missing `nil` checks to correctly handle the case where tracing is disabled. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Dapr 1.9.3 | ||
|
||
## Fixes traces not being reported in certain circumstances | ||
|
||
### Problem | ||
|
||
With tracing enabled, Dapr operators can choose the sampling rate using the `spec.tracing.sampling` option in the Dapr configuration. In Dapr 1.9.0-1.9.2, when a request coming to the Dapr runtime contains a `traceparent` header, the decision on whether to sample the request or not is solely based on the "sampling bit" set in the header's value. | ||
|
||
This behavior was introduced with Dapr 1.9.0 during the transition to the new tracing framework based on the OpenTelemetry (OTEL) standard. Although this behavior is compliant with the W3C specs for distributed tracing, it caused Dapr to omit sending traces to the telemetry collector (e.g. Zipkin, Azure Monitor, etc) in many instances. | ||
|
||
### Impact | ||
|
||
The issue impacts users on Dapr 1.9.0-1.9.2 who have enabled collection of traces. | ||
|
||
Based on reports from Dapr users, developers building apps with ASP.NET Core seem to be particularly impacted, as the .NET Core framework can automatically include a `traceparent` header in every request made to the Dapr sidecar which has the "sampling bit" set to `0` (disabled). | ||
|
||
### Root cause | ||
|
||
Older versions of Dapr (before 1.9.0) ignored the "sampling bit" in the `traceparent` header when making decisions on whether to sample a request. That behavior changed in Dapr 1.9.0, where the decision made by the caller with the `traceparent` header determines the Dapr runtime's sampling choice too. | ||
|
||
### Solution | ||
|
||
We have patched the way Dapr makes decisions on whether to sample a request and submit the trace to the telemetry collector (e.g. Zipkin, Azure Monitor, etc). The new behavior consists of: | ||
|
||
- If the `traceparent` header has the "sampling bit" set to `1` (enabled), the request is always sampled. | ||
- If the "sampling bit" is `0` (disabled), Dapr decides on whether to sample the request based on its own internal policies. For example, with `spec.tracing.sampling` set to `1`, all requests are traced; instead, a value of `0` generates no trace. Numbers in-between 0 and 1 cause Dapr to sample only a fraction of requests. | ||
|
||
This behavior, while more lax, remains compliant with the W3C specs for distributed tracing. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package diagnostics | ||
|
||
import ( | ||
"fmt" | ||
|
||
sdktrace "go.opentelemetry.io/otel/sdk/trace" | ||
"go.opentelemetry.io/otel/trace" | ||
|
||
diagUtils "github.com/dapr/dapr/pkg/diagnostics/utils" | ||
) | ||
|
||
type DaprTraceSampler struct { | ||
sdktrace.Sampler | ||
ProbabilitySampler sdktrace.Sampler | ||
SamplingRate float64 | ||
} | ||
|
||
/** | ||
* Decisions for the Dapr sampler are as follows: | ||
* - parent has sample flag turned on -> sample | ||
* - parent has sample turned off -> fall back to probability-based sampling | ||
*/ | ||
func (d *DaprTraceSampler) ShouldSample(p sdktrace.SamplingParameters) sdktrace.SamplingResult { | ||
psc := trace.SpanContextFromContext(p.ParentContext) | ||
if psc.IsValid() && psc.IsSampled() { | ||
// Parent is valid and specifies sampling flag is on -> sample | ||
return sdktrace.AlwaysSample().ShouldSample(p) | ||
} | ||
|
||
// Parent is invalid or does not have sampling enabled -> sample probabilistically | ||
return d.ProbabilitySampler.ShouldSample(p) | ||
} | ||
|
||
func (d *DaprTraceSampler) Description() string { | ||
return fmt.Sprintf("DaprTraceSampler(P=%f)", d.SamplingRate) | ||
} | ||
|
||
func NewDaprTraceSampler(samplingRateString string) *DaprTraceSampler { | ||
samplingRate := diagUtils.GetTraceSamplingRate(samplingRateString) | ||
return &DaprTraceSampler{ | ||
SamplingRate: samplingRate, | ||
ProbabilitySampler: sdktrace.TraceIDRatioBased(samplingRate), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.