Hey @Laura Broderick
For the span attribute, did you try using the environment variables APPLICATIONINSIGHTS_SELF_DIAGNOSTICS_LEVEL
and APPLICATIONINSIGHTS_SELF_DIAGNOSTICS_FILE_PATH
? You can also try identifying the noisy telemetry with the following query:
search *
| where TimeGenerated > ago(30d)
| where IKey == 'REPLACE WITH DESIRED IKEY'
| summarize count() by $table
| sort by count_ desc
Using these results to query which logs are making the table(s) noisy. For example, if AppDependenices is a noisy table, you can query like
AppDependencies
| where TimeGenerated > ago(30d)
| where IKey == 'REPLACE WITH DESIRED IKEY'
| where Name == 'SQL: DB Query'
| summarize count() by Name, OperationName, Data
| sort by count_ desc
This output should provide you the attribute values you're looking for. May need to use a regex to cover different patterns.
EDIT 9 Feb 2024 I've updated the AppDendencies
query to include Data which you can use to filter by attribute. Compare the value of Data to the output of your Span attributes and use that key/value pair as the key and value in your sampling override.