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

There is no WithEventSourceInfo EmitEventOption #28

Closed
thepeterstone opened this issue May 10, 2018 · 3 comments
Closed

There is no WithEventSourceInfo EmitEventOption #28

thepeterstone opened this issue May 10, 2018 · 3 comments
Labels

Comments

@thepeterstone
Copy link

We have WithSourceInfo (which is an EmitLogOption), WithCounterSourceInfo, WithGaugeSourceInfo and WithTimerSourceInfo, but there is no EmitEventOption corollary.

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/157496267

The labels on this github issue will be updated when the story is started.

@colins
Copy link
Member

colins commented May 30, 2018

@thepeterstone how would you like to use WithEventSourceInfo if it existed? We haven't expanded it up until now for lack of use case.

@hdub2
Copy link
Contributor

hdub2 commented Jun 5, 2018

@colins the same as WithGaugeSourceInfo - right now we have

func setSourceInfo(sourceID, instanceID string) loggregator.EmitEventOption {
  return func(message proto.Message) {
    switch e := message.(type) {
    case *loggregator_v2.Envelope:
      e.SourceId = sourceID
      e.InstanceId = instanceID
    default:
      log.Logger.Panic(fmt.Sprintf("unsupported Message type: %T", message))
    }
  }
}

which is a bit unwieldy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants