question

Venkata T. avatar image
Venkata T. asked ·

What is the best way to exclude sensors

Hi,

I am trying to exclude some of the sensors. I heard that frameworks like spring is detected automatically by auto sensors. So trying to exclude those from the custom sensors. I have made them inactive and bounce the agents but still they are coming up. Do we need to make them as global exclude?. Is there any documentation on exactly them mean by different settings, for "Place" and "Capture" settings. I have attached screenshot.

10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

McKenna J. avatar image
McKenna J. answered ·

If they are coming up from auto sensors you will not be able to not see them. How i understand auto sensors to work is that they come from a sample of collection and only the ones that are reported are those that are significant. If you are still seeing them instrumented then makes sure to check in debug mode so that no extra sensor placements have happened.

A global exclude would work to resolve this too.

1 comment Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Thx Jacob. i did that now. I have to wait till next deployment for that to take effect. I just want to understand the difference between exclude and inactive. Also what is the difference between "Place" and "Capture".

0 Likes 0 · ·
Rob V. avatar image
Rob V. answered ·

The differences in the terms you mention has to do with actual injection of byte code into the JVM. When a sensor (or sensor pack/group) is "placed", that is an instruction to dynaTrace to load byte code into the JVM for the matching methods.

Once "placed" (injected) you can now do some on-the-fly configuration of those placed sensors. For example, you can set them to "inactive", or you can turn "capture" off. That basically changes a state flag and direct dT to return no data for those sensors, even though their sensor byte-code still exists in the JVM.

To exclude some non-core sensor packs from dynaTrace, you just need to "un-place" them from the agent groups in your system profile. That will stop them from being injected. Note that you may still see them in PurePaths as being captured by auto-sensors.

A note on Global Exclude: while it is all-powerful for "normal" code (your code for example) it is possible that dynaTrace will ignore Global Excludes for its core functionality sensor packs. In this way, dT protects itself from users who might try to exclude things that dT depends upon.

Rob

7 comments Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Thanks Rob. It makes more sense now. Even though i have "inactive" for both place and capture i am still seeing them in the method execution. Now i have put them as "Global Exclude" and i have to wait till this Friday to see if it works or not.

When we instrument something in the agent, we can see what has been instrumented in the "Deployed sensors". Is there a way to check like what has been excluded or Inactive (smile)

If GlobalExclude also does not work then i will remove them from the sensor definitions. I think it is a better idea to remove them all together instead of doing the global exclude? Anyways they will be shown in the PP if they are that significant.

0 Likes 0 · ·

I am a little confused by your situation, honestly. The frameworks like Struts and Hibernate are not "core" elements and can easily be "unplaced" in the various agent groups. Spring is not even shipped as an OOTB framework, so if you have that you have probably downloaded that from the Community, or you have maybe migrated an old System Profile from v3.x??

I don't have any of those OOTB frameworks (Hibernate and Struts) placed, and I don't see them on any PPs. By "see them", I mean they do not show up on the PP with a "blue M" icon which indicates the result of a "placed" (or injected) sensor.

And, if you have set these sensors to be "inactive" and you are still seeing them as "blue M" icons (and you are SURE you made them in active in all agent groups) then that's a problem and should be sent to support.

So just to make sure we're clear:

  • when you "place" (to add) or "unplace" (to remove) a sensor group/pack by selecting it in Sensor Placement in an agent group, that action requires a restart of your JVM/CLR to make it happen (or a Hot Sensor Placement in Java, if you're allowed to do that). Bounce or HSP will add or remove the sensor's byte code from the JVM
  • When you set something to be "inactive", that is an immediate change and requires no bounce or HSP.

So if you did the "inactive" in each agent group and are still seeing it, that's a problem.

Rob

0 Likes 0 · ·

Thx rob. I will open a ticket as I am seeing them even After I have put them as inactive.

0 Likes 0 · ·

Hi Venkata,

What ever came of this situation? I'm curious...

Rob

0 Likes 0 · ·

Thx Rob for checking. Actually those sensors have API as servlet so the support person mentioned, even though it is inactive from the custom sensor, it is being invoked by the standard sensor, so i did global exclude. Does that makes sense?

0 Likes 0 · ·

Did that work for you? There are many cases where we will ignore global excludes for some of our core sensor packs. Were you able to confirm (via the Deployed Sensors tab in the Agent Overview dashlet) that the sensors are in fact not injected? That's the way to tell for sure.

Rob

0 Likes 0 · ·

Yes, it did work for me Rob. i verified it in the deployed sensors.

0 Likes 0 · ·