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: otlp connection span count/reset endpoints #3533

Merged
merged 11 commits into from Jan 17, 2024

Conversation

mathnogueira
Copy link
Member

@mathnogueira mathnogueira commented Jan 16, 2024

This PR add the implementation for counting the number of spans received by the OTLP ingester.

image

Checklist

  • tested locally
  • added new dependencies
  • updated the docs
  • added a test

i.mutex.Lock()
defer i.mutex.Unlock()

i.spanCount += newSpansCount
Copy link
Contributor

Choose a reason for hiding this comment

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

Sanity check question: Does this counter consider different counts for tenantIds?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, it doesn't. However, this ingester is only used by the core version, thus tenant ids are irrelevant. The agent ingester must care about it though.


func (t *OTLPConnectionTester) GetSpanCount(ctx context.Context, opts ...GetSpanCountOption) (OTLPConnectionTestResponse, error) {
config := getSpanCountConfig{
timeout: 30 * time.Second,
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we move this timeout to a constant?

@mathnogueira mathnogueira merged commit 1611db7 into main Jan 17, 2024
37 checks passed
@mathnogueira mathnogueira deleted the feat/otlp-connection-test branch January 17, 2024 14:36
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

3 participants