Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(trace): Add example of tags to be used in jaeger #502

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

MichelDiz
Copy link
Contributor

No description provided.

@netlify
Copy link

netlify bot commented Mar 2, 2023

Deploy Preview for dgraph-docs-repo ready!

Name Link
🔨 Latest commit 1f9e663
🔍 Latest deploy log https://app.netlify.com/sites/dgraph-docs-repo/deploys/6403901f3acade0008b094f9
😎 Deploy Preview https://deploy-preview-502--dgraph-docs-repo.netlify.app/deploy/tracing
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

### Other tags available

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The OpenTrace information collected by Dgraph and displayed in Jaeger contains various messages and metadata that can also be filtered by tag. Below is a list of information that is in Jaeger as a tag.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that a suggestion of a text to introduce or are you just commenting?

#### Tag error

This tag you will filter out based on error status.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should give a little more info on what the tag would match. Doing a quick search for "error" annotations I only find it in otrace.Attribute{otrace.BoolAttribute("error", true)} in oracle.go::428, so I think we can say that this will find transactions that encountered an error during the commit operation (vs other internal errors).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, This text can be expanded. It is humanly impossible to explain what each tag does and why at the moment. It was hard to find the ones that works. All of those I've tested on my end.

BTW, several messages are random. So I've skipped a bunch of them. They have random IDs, random timestamps, random errors, erros based on predicate(which can be any). So I have added only those who doesn't change over time.

But to explain them I think this is a more deep research. This PR is just a beginning.

#### Tag status.code

This tag you will filter out based on status code 0, 1 or 2.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know what this code means?

Copy link
Contributor Author

@MichelDiz MichelDiz Mar 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is based on unix status code. Shell based I mean. 0 mean successful, 1 and 2 are errors. 2 is in general a panic or something serious.

available attributes
```
handleHasFunction, n.proposeAndWait, dgraph.Execute, resolveMutation,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pasted a bunch of these in Jaeger, but did not get results. Is there a particular syntax needed? We should say more about these, such as that certain ones mean a particular thing, or that generally you can go search the code for these to see what they capture.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing special. You need to run a query in order to see. For example, run a has function and then add this tag
funcName=handleHasFunction

But you have to set to all Operation. Don't filter by operation. Or filter by query.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants