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

ExtendedS3Storage class does not publish any storage related metrics #4505

Closed
sachin-j-joshi opened this issue Jan 21, 2020 · 0 comments · Fixed by #4510
Closed

ExtendedS3Storage class does not publish any storage related metrics #4505

sachin-j-joshi opened this issue Jan 21, 2020 · 0 comments · Fixed by #4510

Comments

@sachin-j-joshi
Copy link
Contributor

Problem description
ExtendedS3Storage class does not publish any storage related metrics.

Problem location
ExtendedS3Storage implementation.

Suggestions for an improvement

Implement following metrics.

// Storage stats
    public static final String STORAGE_READ_LATENCY = PREFIX + "segmentstore.storage.read_latency_ms";   // Histogram
    public static final String STORAGE_WRITE_LATENCY = PREFIX + "segmentstore.storage.write_latency_ms"; // Histogram
    public static final String STORAGE_READ_BYTES = PREFIX + "segmentstore.storage.read_bytes";          // Counter
    public static final String STORAGE_WRITE_BYTES = PREFIX + "segmentstore.storage.write_bytes";        // Counter
    public static final String STORAGE_CREATE_COUNT = PREFIX + "segmentstore.storage.create_count";      // Counter


Define metrics for ECS in following class and use it in ExtendedS3Storage.java at appropriate places

final class ExtendedS3Metrics {
    private static final StatsLogger ECS_LOGGER = MetricsProvider.createStatsLogger("ecs");
    static final OpStatsLogger READ_LATENCY = ECS_LOGGER.createStats(MetricsNames.STORAGE_READ_LATENCY);
    static final OpStatsLogger WRITE_LATENCY = ECS_LOGGER.createStats(MetricsNames.STORAGE_WRITE_LATENCY);
    static final Counter READ_BYTES = ECS_LOGGER.createCounter(MetricsNames.STORAGE_READ_BYTES);
    static final Counter WRITE_BYTES = ECS_LOGGER.createCounter(MetricsNames.STORAGE_WRITE_BYTES);
    static final Counter CREATE_COUNT = ECS_LOGGER.createCounter(MetricsNames.STORAGE_CREATE_COUNT);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant