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

Added new redis.instance resource attribute and config parameter #5922

Closed
wants to merge 2 commits into from

Conversation

manang-splunk
Copy link
Contributor

@manang-splunk manang-splunk commented Oct 26, 2021

Description: Added new redis.instance resource attribute and also added config parameter redis_instance to make it configurable.

Testing: Updated the existing test case to verify redis.instance attribute.

Documentation: Added new config parameter in readme.md file.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 26, 2021

CLA Signed

The committers are authorized under a signed CLA.

  • ✅ manang-splunk (b3d1a051520e0699ffa2648024d9b2857f762e07)

@manang-splunk manang-splunk changed the title Add redis_instance field in config and redis.instance attribute to all metrics Added new redis.instance resource attribute and config parameter Oct 26, 2021
@manang-splunk manang-splunk marked this pull request as ready for review October 26, 2021 13:40
@manang-splunk manang-splunk requested review from a team and jpkrohling October 26, 2021 13:40
require.NoError(t, err)
md, err := runner.Scrape(context.Background())
require.NoError(t, err)
// + 6 because there are two keyspace entries each of which has three metrics
assert.Equal(t, len(getDefaultRedisMetrics())+6, md.DataPointCount())
rm := md.ResourceMetrics().At(0)
value, _ := rm.Resource().Attributes().Get("redis.instance")
Copy link
Member

Choose a reason for hiding this comment

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

Please add this convention to the specs. Also why not using "service.name=redis" and "service.instance=3"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As redis.instance is attribute specific to redis receiver so we do not need to add it to convention.

Copy link
Member

Choose a reason for hiding this comment

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

That is not true :) conventions are even for a specific product/database if they are intended to be transferred on the wire for example between this collector and a backend (splunk for example). It is still a convention, and without having that in the specs it looks like a vendor specific convention.

Copy link
Member

@bogdandrutu bogdandrutu left a comment

Choose a reason for hiding this comment

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

See comment about redis_instance

@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions
Copy link
Contributor

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Dec 11, 2021
povilasv referenced this pull request in coralogix/opentelemetry-collector-contrib Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants