Skip to content

Problem to configure sampling override #3511

Description

@pasomaal

Is your feature request related to a problem? Please describe.
How do I configure sampling to e.g. 30% and keep all underlying process exceptions logged.
I have a running process where requests are logged and sampled at 30%.
A background process is generating exceptions and these seem also to be sampled at 30%.
How do I keep all exceptions logged?

Describe the solution you would like
Keep all exceptions logged using a sampling override.

Additional context
I tried the below configuration, but doesn't seem to work.

{
  "connectionString": "someconnectionstring",
  "role": {
    "name": "SomeRoleName"
  },
  "instrumentation": {
	"logging": {
	  "level": "WARN"
	}
  },
  "sampling": {
	"percentage": 30
  },
  "preview": {
	"sampling": {
	  "overrides": [
	    {
		  "telemetryType": "exception",
		  "attributes": [
		    {
			  "key": "exception.type",
			  "value": ".*",
			  "matchType": "regexp"
			}
		  ],
		  "percentage": 100
		}
	  ]
	}
  }
}
```

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions