Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Question: How do we send SQL queries? #11

Closed
dkullmann opened this issue Feb 27, 2015 · 7 comments
Closed

Question: How do we send SQL queries? #11

dkullmann opened this issue Feb 27, 2015 · 7 comments

Comments

@dkullmann
Copy link

@jngli hello, do you know how we can send an SQL query?

I see the telemetry type is a metric, but I don't know what the custom properties are that should be included.

@jngli
Copy link
Contributor

jngli commented Feb 27, 2015

There are multiple telemetry types as defined in the contract classes, all of them support properties which are custom defined, that is, you define the property and responsible for tracking its value.

@dkullmann
Copy link
Author

@jngli thank you, we'll try sending SQL data using this and setting it to 3

Our goal is to make sure the SQL metrics show up here:
image

We also weren't sure if SQL metrics could include SQL-specific things like Time + Query (we can include them as custom properties.)

@jngli
Copy link
Contributor

jngli commented Feb 28, 2015

The rdd (RemoteDependencyData) is not officially supported by Ruby SDK yet, not exposed directly via TelemetryClient. You could manually create an rdd and send to AI using the telemetry channel, what you've done I think. However there are two issues while processing rdd:

  1. The dependency kind is not processed correctly and got addressed recently with a schema change but not updated in Ruby SDK yet.
  2. The rdd would be ignored if ai.device.id is not specified which would be fixed in the server side in the near future.

You can work around the above issues with following changes:

  1. rdd.dependency_kind = 0 # SQL should be set to 0
  2. tc.context.device.id = "1" # explicitly set device id

What do you mean by 'Time', the time stamp making the sql query, execution time, or something else? For query, yes, you can use the custom property to track it.

Thanks,
Jing

@dkullmann
Copy link
Author

@jngli exactly — the SQL query execution time.

Thank for all the other info, btw.

@jngli
Copy link
Contributor

jngli commented Mar 1, 2015

The 'value' field is supposed to use for tracking execution time (i.e., dependency duration used in UI).

@dkullmann
Copy link
Author

@jngli ok perfect, thank you!

@jngli
Copy link
Contributor

jngli commented Mar 5, 2015

@dkullmann the sdk is updated with latest schema where the dependency kind issue should be fixed.

@jngli jngli closed this as completed Mar 9, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants