GithubHelp home page GithubHelp logo

Comments (4)

olga-larina avatar olga-larina commented on July 18, 2024

And I have a question about LongTaskTimer (xxx.active metrics). Should I create another issue for it?

public void onStart(Observation.Context context) {
if (shouldCreateLongTaskTimer) {
LongTaskTimer.Sample longTaskSample = LongTaskTimer.builder(context.getName() + ".active")
.tags(createTags(context))
.register(meterRegistry)
.start();
context.put(LongTaskTimer.Sample.class, longTaskSample);
}

LongTaskTimer is created on start of the observation with tags. But at this time in Spring we have only default tag values (for example, http status code). Is it a problem in Spring web?

from micrometer.

olga-larina avatar olga-larina commented on July 18, 2024

And I have a question about LongTaskTimer (xxx.active metrics). Should I create another issue for it?

public void onStart(Observation.Context context) {
if (shouldCreateLongTaskTimer) {
LongTaskTimer.Sample longTaskSample = LongTaskTimer.builder(context.getName() + ".active")
.tags(createTags(context))
.register(meterRegistry)
.start();
context.put(LongTaskTimer.Sample.class, longTaskSample);
}

LongTaskTimer is created on start of the observation with tags. But at this time in Spring we have only default tag values (for example, http status code). Is it a problem in Spring web?

This question was answered in spring-projects/spring-framework#32897

from micrometer.

jonatan-ivanov avatar jonatan-ivanov commented on July 18, 2024

Thank you for the issue. In general Observations should not be modified from multiple threads concurrently so I'm curious what you are trying to do.

volatile ObservationConvention convention ?

Why should this be volatile? The convention is set from the ctor and a setter, this should not be thread safe I think, if you have concurrency issues with it, could you please tell us what you are trying to do (a minimal java test/reproducer would help)?

ConcurrentLinkedDeque instead of ArrayDeque?

Why should this be concurrent? The deque here is a local variable, cannot be accessed from multiple threads

Everything else: I think they are the same as the convention, I don't think you should access them concurrently so they don't ned to be thread safe. If you have concurrency issues with them, could you please tell us what you are trying to do (a minimal java test/reproducer would help)?

from micrometer.

github-actions avatar github-actions commented on July 18, 2024

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

from micrometer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.