cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Querying a bind variables to user in Dashboard, metric etc

abhijitmorye
Frequent Guest

Hello Team,

We have enabled the bind variable for one of our tenants, and we are seeing the values of the bind variables in Dynatrace. However, I want to know where these values of bind variables are stored in Dynatrace. 

I am trying to find it in logs/spans, but have not been able to. Is there any way to use DQL to fetch the values of bind variables for each query in logs?

Thank you so much.

4 REPLIES 4

marco_irmer
Champion

The bind variable values are stored as part of the spans, specifically in the db.query.parameters field. You can find the complete description of how database client spans are stored in Grail at https://docs.dynatrace.com/docs/discover-dynatrace/references/semantic-dictionary/model/trace#databa...

I hope that helps.

HelloMarco,

 

Thanks for your message, however I am not able to view this db.query.paramaters in the spans. Below is the snapshots showing the names of the columns that I am currently seeing in the Dynatrace.

As you can see, I am not able to view the db.query.parameters in the list of columns.

trace.idspan.iddt.entity.hostdt.entity.host_groupdt.entity.servicedt.entity.process_groupdt.entity.process_group_instancedt.host_group.idhost.namedb.systemhttp.server_nameaggregation.countaggregation.duration_maxaggregation.duration_minaggregation.duration_samplesaggregation.duration_sumaggregation.exception_countaggregation.parallel_executioncode.call_stackcode.functioncode.namespacedb.affected_item_countdb.namespacedb.operation.namedb.query.textdb.result.duration_sumdb.result.exception_countdb.result.execution_countdt.agent.module.iddt.agent.module.typedt.agent.module.versiondt.agent.module.version_shortdt.ingest.sizedt.openpipeline.pipelinesdt.openpipeline.sourcedt.retain.sizedt.system.monitoring_sourcedurationend_timejava.main.classprocess.executable.nameprocess.executable.pathprocess.pidsampling.thresholdserver.addressserver.portserver.resolved_ipsservlet.context.nameservlet.context.pathspan.is_subroutinespan.kindspan.namespan.parent_idspan.timing.cpuspan.timing.cpu_selfstart_timesubtrace.idsupportability.alr_sampling_ratiosupportability.atm_sampling_ratiothread.idthread.nameweblogic.cluster.nameweblogic.domain.nameweblogic.homeweblogic.server.name

If you are using DQL, then it may be necessary to use the fieldsAdd command to ensure the column is there. You may also wish to add a filter to only list spans that actually have data in this field. 

A simple example query might look like this:

fetch spans
| filter isNotNull(db.query.parameters)
| fieldsAdd db.query.parameters

 If no spans come up, then it might be time to engage support for additional investigation

abhijitmorye
Frequent Guest

Thanks for the query. I ran the same query but did not find any column named db.query.paramaeters. We are going to raise this as support ticket with Dynatrace.

Thanks once again.

Featured Posts