Coder Social home page Coder Social logo

Comments (5)

rakyll avatar rakyll commented on June 16, 2024

Actually the exported types are never useful, we should instead keep the constructors and unexport the types.

func NewWindowCumulative() Window
func NewWindowSlidingCount(count uint64, subSets int) Window
func NewWindowSlidingTime(duration time.Duration, subIntervals int) Window

from opencensus-go.

acetechnologist avatar acetechnologist commented on June 16, 2024

The types will still be needed by the exporters. That is how we can populate zpages and other exporters.

from opencensus-go.

rakyll avatar rakyll commented on June 16, 2024

Can you give more info how the zpages and exporters need these types please? These types don't export anything. Will they be just type casted?

from opencensus-go.

acetechnologist avatar acetechnologist commented on June 16, 2024

The data collected *ViewData returns the view along with the data collected (aka Rows).
The View have methods to return the interfaces: Window, Aggregation... The exporter needs to type switch on this interface to determine what Window or Aggregation it is and maybe extract or not data from them.
For example WindowSlidingTime needs to have a mehtod Duration() that returns the duration. This will allow the exporter to know that this data was for the last" 30s, 1mn, 5mn or whatever else.
We need Duration() instead of just exporting the field because we want them to be immutable once created.

This also applies to the interface AggregationValue returned in the Rows. It needs to be type switched to the right AggregationDistributionValue, AggregationCountValue...

from opencensus-go.

rakyll avatar rakyll commented on June 16, 2024

Closed via #54 and #55.

from opencensus-go.

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.