Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

No SetExtraContext function? #111

Closed
goofansu opened this issue Nov 1, 2016 · 2 comments
Closed

No SetExtraContext function? #111

goofansu opened this issue Nov 1, 2016 · 2 comments

Comments

@goofansu
Copy link

goofansu commented Nov 1, 2016

How can I set extra content described in https://docs.sentry.io/learn/context/#extra-context ?

@adriancooney
Copy link

adriancooney commented Dec 5, 2016

You can't, it's hard coded: https://github.com/getsentry/raven-go/blob/master/client.go#L163-L175

// NewPacket constructs a packet with the specified message and interfaces.
func NewPacket(message string, interfaces ...Interface) *Packet {
	extra := map[string]interface{}{
		"runtime.Version":      runtime.Version(),
		"runtime.NumCPU":       runtime.NumCPU(),
		"runtime.GOMAXPROCS":   runtime.GOMAXPROCS(0), // 0 just returns the current value
		"runtime.NumGoroutine": runtime.NumGoroutine(),
	}
	return &Packet{
		Message:    message,
		Interfaces: interfaces,
		Extra:      extra,
	}
}

I'd like this feature too. For now, we're sending the variable data as tags which isn't ideal.

@syndbg
Copy link

syndbg commented Apr 11, 2017

Update.

#134 addresses this.

syndbg added a commit to syndbg/raven-go that referenced this issue Apr 11, 2017
syndbg added a commit to syndbg/raven-go that referenced this issue Jun 1, 2017
syndbg added a commit to syndbg/raven-go that referenced this issue Jun 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants