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

feat: add activity on connection #1734

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

Conversation

aygalinc
Copy link

Proposed Changes

Add activity on connection creation.
In case of creation exception register an error event.

Types of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • [X ] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)

Refer to #1731

}

Activity? connectionActivity =
s_connectionSource.StartRabbitMQActivity("rabbitmq connect", ActivityKind.Client);
Copy link
Member

Choose a reason for hiding this comment

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

Please rename "rabbitmq connect" to "connection.open". It is obvious that this client will connect to a RabbitMQ node.

Copy link
Author

Choose a reason for hiding this comment

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

ok to rename but activity name is used in all UI when traces are ingested, I highly recommand to set a more human friendly name like "connection open"

Copy link
Member

Choose a reason for hiding this comment

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

"connection open" (with a space) is not grammatically correct. "connection.open" is a protocol frame name but I can see how that'd be too obscure.

"connection attempt" can be used before we know that the connection succeeded. "connection opened" can be used after a successful connection. In fact, both can be used at the same time in different places.

Copy link
Author

Choose a reason for hiding this comment

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

"connection attempt" should be good because we do not know if its a success.
Span status will be set to ERROR and an exception event will be attached to the current span if it fails.

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.

2 participants