Skip to content

Use AccessorInfo instead of seperate fields #5795

Closed
@Xuanwo

Description

@Xuanwo

Our current obsever::MetricLayer is using seperate fields like:

fn observe_operation_duration_seconds(
    &self,
    scheme: Scheme,
    namespace: Arc<String>,
    root: Arc<String>,
    path: &str,
    op: Operation,
    duration: Duration,
);

This makes it difficult to expand and requires adding a lot of duplicated code for users to call and implement. Also, this will add extra copies of root and name.

We can scope them into Arc<AccessorInfo> instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions