Comments (18)
@Charlie441324219
I believe you're running very old version of Azure ServiceBus where we used different set of attributes and configuration options.
With newer version of servicebus and the agent you'd be able to you'd be able to override sampling settings. It also contains a LOT of perf and reliability improvements.
If you update ServiceBus version, you would be to disable distributed tracing on the client instance using the following code.
TracingOptions tracingOptions = new TracingOptions().setEnabled(false);
ClientOptions clientOptions = new AmqpClientOptions().setTracingOptions(tracingOptions);
return new ServiceBusClientBuilder()
.clientOptions(clientOptions )
Without updating, I think the best option would be to disable all Azure SDK instrumentation including ServiceBus - you can do it via the config or env var - https://learn.microsoft.com/en-us/azure/azure-monitor/app/java-standalone-config#suppress-specific-autocollected-telemetry.
from applicationinsights-java.
Thank you @heyams , I will raise a ticket to MSFT via company.
from applicationinsights-java.
Thank you @lmolkova , I will go ahead with disabling all Azure SDK instrumentation
from applicationinsights-java.
@Charlie441324219 thanks for reaching out.
you should be able to sample out servicebus requests.
can you pls share your json config regarding sampling overrides? this is how you can find out servicebus request's attributes.
from applicationinsights-java.
Hi @heyams , thank you for your reply, this is my config to sample out servicebus request
{
"telemetryType": "request",
"attributes": [
{
"key": "http.url",
"value": ".*servicebus.windows.net.*",
"matchType": "regexp"
}
],
"percentage": 0
}
from applicationinsights-java.
@Charlie441324219 can you share your full applicaitoninsights.json config and your applicationinsights.log at debug logging level? we ga sampling overrides since 3.5.0 GA. our azure doc got updated. I want to make sure you use the correct config for 3.4.17. please try out 3.5.1 GA.
from applicationinsights-java.
Sure @heyams , this is my full config
{
"sampling": {
"percentage": 100
},
"jmxMetrics": [
{
"name": "Heap Memory Usage-used",
"objectName": "java.lang:type=Memory",
"attribute": "HeapMemoryUsage.used"
}
],
"instrumentation": {
"logging": {
"level": "ALL"
}
},
"preview": {
"captureLoggingLevelAsCustomDimension": true,
"sampling": {
"overrides": [
{
"telemetryType": "dependency",
"percentage": 0
},
{
"telemetryType": "request",
"attributes": [
{
"key": "http.url",
"value": ".*servicebus.windows.net.*",
"matchType": "regexp"
}
],
"percentage": 0
}
]
}
},
"selfDiagnostics": {
"destination": "console",
"level": "DEBUG"
}
}
from applicationinsights-java.
@Charlie441324219 applicationinsights.log please, you may share a link with me somewhere? your config looks good to me though.
from applicationinsights-java.
Hi @heyams , I am afraid I cannot share that due to the company policy. could you please provide more details about how to setup the key
and value
based on applicationinsights.log ?
from applicationinsights-java.
from applicationinsights-java.
from exporting span I can see
attributes=AttributesMap{data={peer.address=stage-membership-credit.servicebus.windows.net, thread.name=boundedElastic-19, message_bus.destination=credit-sync/subscriptions/quickScreenAttachments, applicationinsights.internal.item_count=1, thread.id=130, x-opt-enqueued-time=1710354044, az.namespace=Microsoft.ServiceBus}, capacity=128, totalAddedValues=7}, totalAttributeCount=7, events=[], totalRecordedEvents=0, links=[], totalRecordedLinks=0, status=ImmutableStatusData{statusCode=OK, description=}, hasEnded=true}
so I tried with
{
"telemetryType": "request",
"attributes": [
{
"key": "peer.address",
"value": ".*servicebus.windows.net",
"matchType": "regexp"
}
],
"percentage": 0
}
but still not work
from applicationinsights-java.
i don't find attributes though. it's hard for me to help you further if you don't share your log with me. you can redact any sensitive information in the log and then share.
from applicationinsights-java.
@Charlie441324219 hey Charlie, there was an upstream fix for azure-core 1.36.
your issue seems related to #3147.
can you confirm if you're using azure-core 1.36+?
from applicationinsights-java.
Hi @lmolkova ,
Thank you for your info, after disabling all Azure SDK instrumentation, I cannot see servicebus request anymore. But is there any other impact for disabling Azure SDK instrumentation ? Is that possible that I lost some important log ?
from applicationinsights-java.
Hi @lmolkova ,
Thank you for your info, after disabling all Azure SDK instrumentation, I cannot see servicebus request anymore. But is there any other impact for disabling Azure SDK instrumentation ? Is that possible that I lost some important log ?
The Application Insights config (or environment variable) and the flag on tracing options only affect distributed tracing and not logs.
By disabling Azure SDK instrumentation in Application Insights config you disable all requests
and dependencies
from all Azure SDKs. By setting the flag on Service Bus client options, you disable one specific instance of this client.
You'll still get logs based on your logging provider configuration.
from applicationinsights-java.
Hi @lmolkova ,
Thank you for your info, after disabling all Azure SDK instrumentation, I cannot see servicebus request anymore. But is there any other impact for disabling Azure SDK instrumentation ? Is that possible that I lost some important log ?The Application Insights config (or environment variable) and the flag on tracing options only affect distributed tracing and not logs. By disabling Azure SDK instrumentation in Application Insights config you disable all
requests
anddependencies
from all Azure SDKs. By setting the flag on Service Bus client options, you disable one specific instance of this client.You'll still get logs based on your logging provider configuration.
What about exceptions from Azure SDK ? If we lost exception logs, we will have big trouble.
from applicationinsights-java.
What about exceptions from Azure SDK ? If we lost exception logs, we will have big trouble.
Exceptions come from logs (and then are mapped to exceptions or traces with error severity if there was no exception associated with an error) and not as requests or dependencies, so this setting should not affect them.
from applicationinsights-java.
@Charlie441324219 thanks! pls let me know if i can close this issue now.
from applicationinsights-java.
Related Issues (20)
- [Question] Why relocate logback packages and configuration files HOT 2
- How to add a Prefix to the names of the default captured metrics HOT 4
- Azure function app integration to Dynatrace in Linux with Open telemetry HOT 2
- HTTP dependencies are not reported in latest Spring Boot 3.2. HOT 2
- Download URL format changed in 3.5.0 HOT 3
- Operation name/ Operation id missing for manual created threads HOT 7
- Azure ApplicationInsights stopped reporting Query paramters in Request traces - With 3.5.0 HOT 1
- Adding per-worker metrics reported to JMX in applicationinsights.json for App Insights HOT 4
- Question: azure log analytics workspace migration HOT 1
- Q: regarding client secrets support HOT 1
- CVE-2023-52428 HOT 2
- Application Insights runtime attach agent metric-filtering not working HOT 10
- Workflow failed: OWASP dependency check (daily) (#532) HOT 1
- Workflow failed: OWASP dependency check (daily) (#542)
- Workflow failed: OWASP dependency check (daily) (#547)
- Sampling based on dependency result HOT 2
- OpenTelemetry support for MQTT pub/sub with Application Insights Java agent HOT 1
- Ignore newline and carriage return in the connection string file
- Sampling override based on request processing time? HOT 7
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 applicationinsights-java.