Comments (3)
Indeed, stupid me.
Paying more attention, I saw that the operationName for an action is **Action** [controller]/[Action]
. Putting that, I can assign the probability well enough.
The only annoying thing is that the httpIn "HTTP POST" span will appear. But it's ok
from csharp-netcore.
I'm having the same issue - I can filter on HTTP POST or HTTP GET, but if I put e.g "Action MySampleApp.Controllers.ValuesController/POST" nothing is filtered.
My setup looks like this:
new PerOperationSampler(100000, new OperationSamplingParameters(1d, -1, new List<PerOperationSamplingParameters> { new PerOperationSamplingParameters("Action MySampleApp.Controllers.ValuesController/POST", new ProbabilisticSamplingStrategy(0)) }), sp.GetRequiredService<ILoggerFactory>());
from csharp-netcore.
You could move the sampling to this library by ignoring requests based on an algorithm. Starting with v0.7.0 this libary does no longer create any child spans (EF Core, SQL, HTTP) if the request itself is ignored, so this should give you what you want.
builder.ConfigureAspNetCore(options =>
{
options.Hosting.IgnorePatterns.Add(ctx =>
{
// Ignore 90% of requests = Sampling of 10%
var newRandom = random.Next(100);
return newRandom >= 10;
});
});
from csharp-netcore.
Related Issues (20)
- NullReferenceException during reflection of diagnostic events
- Nuget version clashes with minio version 6
- Turn off DiagnosticSource Logs HOT 4
- Question: Why child span not created? HOT 1
- Support Worker Service template
- System.ArgumentException: An item with the same key has already been added. Key: ot-Span HOT 1
- Enabling EF and/or CoreFx support resulting in lost spans HOT 1
- Can't control which Sql Command will create a span HOT 1
- Ignore ElasticSearch HealthCheck is not working HOT 1
- Adjustment of SqlClientDiagnostics HOT 1
- Using this makes a lot of log noise coming from Microsoft.* HOT 1
- Log level in EntityFrameworkCoreDiagnostics HOT 1
- this project can't open by visual studio 2019? HOT 2
- GenericEventOptions internal namespace HOT 1
- Project seems to be targeting netcoreapp2.1 and 3.1, but nuget package depends on netcoreapp2.0 HOT 4
- Capture SOAP Action HOT 2
- Creating Spans for SignalR messages sent over Web Sockets HOT 5
- Event-Exception: "Microsoft.Data.SqlClient.WriteCommandBefore"
- [0.7.x only] The type name 'OperationAbortedException' could not be found in the namespace 'System.Data'.
- Should I being using this project or opentelemetry-dotnet packages? HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csharp-netcore.