Repository: rollbar/rollbar-go
Pull request #98 (2022-06-29 04:30:53)

reverting private client - making it public
## Description of the change

Making client public again.

## Type of change

- [x] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Maintenance
- [ ] New release

## Related issues

> Shortcut stories and GitHub issues (delete irrelevant)

- Fix [SC-]
- Fix #1

## Checklists

### Development

- [ ] Lint rules pass locally
- [ ] The code changed/added as part of this pull request has been covered with tests
- [ ] All tests related to the changed code pass in development

### Code review

- [ ] This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
- [ ] "Ready for review" label attached to the PR and reviewers assigned
- [ ] Issue from task tracker has a link to this pull request
- [ ] Changes have been reviewed by at least one other engineer



Patch:
diff --git a/client.go b/client.go
index 6c9d9d5..8ebd1fe 100644
--- a/client.go
+++ b/client.go
@@ -19,7 +19,7 @@ import (
 // However, if you want to customize the underlying transport layer, or you need to have
 // independent instances of a Client, then you can use the constructors provided for this
 // type.
-type client struct {
+type Client struct {
 	io.Closer
 	// Transport used to send data to the Rollbar API. By default an asynchronous
 	// implementation of the Transport interface is used.
@@ -31,16 +31,16 @@ type client struct {
 
 // New returns the default implementation of a Client.
 // This uses the AsyncTransport.
-func New(token, environment, codeVersion, serverHost, serverRoot string) *client {
+func New(token, environment, codeVersion, serverHost, serverRoot string) *Client {
 	return NewAsync(token, environment, codeVersion, serverHost, serverRoot)
 }
 
 // NewAsync builds a Client with the asynchronous implementation of the transport interface.
-func NewAsync(token, environment, codeVersion, serverHost, serverRoot string) *client {
+func NewAsync(token, environment, codeVersion, serverHost, serverRoot string) *Client {
 	configuration := createConfiguration(token, environment, codeVersion, serverHost, serverRoot)
 	transport := NewTransport(token, configuration.endpoint)
 	diagnostic := createDiagnostic()
-	return &client{
+	return &Client{
 		Transport:     transport,
 		Telemetry:     NewTelemetry(nil),
 		configuration: configuration,
@@ -49,11 +49,11 @@ func NewAsync(token, environment, codeVersion, serverHost, serverRoot string) *c
 }
 
 // NewSync builds a Client with the synchronous implementation of the transport interface.
-func NewSync(token, environment, codeVersion, serverHost, serverRoot string) *client {
+func NewSync(token, environment, codeVersion, serverHost, serverRoot string) *Client {
 	configuration := createConfiguration(token, environment, codeVersion, serverHost, serverRoot)
 	transport := NewSyncTransport(token, configuration.endpoint)
 	diagnostic := createDiagnostic()
-	return &client{
+	return &Client{
 		Transport:     transport,
 		Telemetry:     NewTelemetry(nil),
 		configuration: configuration,
@@ -62,7 +62,7 @@ func NewSync(token, environment, codeVersion, serverHost, serverRoot string) *cl
 }
 
 // CaptureTelemetryEvent sets the user-specified telemetry event
-func (c *client) CaptureTelemetryEvent(eventType, eventlevel string, eventData map[string]interface{}) {
+func (c *Client) CaptureTelemetryEvent(eventType, eventlevel string, eventData map[string]interface{}) {
 	data := map[string]interface{}{}
 	data["body"] = eventData
 	data["type"] = eventType
@@ -74,7 +74,7 @@ func (c *client) CaptureTelemetryEvent(eventType, eventlevel string, eventData m
 }
 
 // SetTelemetry sets the telemetry
-func (c *client) SetTelemetry(options ...OptionFunc) {
+func (c *Client) SetTelemetry(options ...OptionFunc) {
 	c.Telemetry = NewTelemetry(c.configuration.scrubHeaders, options...)
 }
 
@@ -82,53 +82,53 @@ func (c *client) SetTelemetry(options ...OptionFunc) {
 // If this is true then this library works as normal.
 // If this is false then no calls will be made to the network.
 // One place where this is useful is for turning off reporting in tests.
-func (c *client) SetEnabled(enabled bool) {
+func (c *Client) SetEnabled(enabled bool) {
 	c.configuration.enabled = enabled
 }
 
-// SetToken sets the token used by this client.
+// SetToken sets the token used by this Client.
 // The value is a Rollbar access token with scope "post_server_item".
 // It is required to set this value before any of the other functions herein will be able to work
 // properly. This also configures the underlying Transport.
-func (c *client) SetToken(token string) {
+func (c *Client) SetToken(token string) {
 	c.configuration.token = token
 	c.Transport.SetToken(token)
 }
 
 // SetEnvironment sets the environment under which all errors and messages will be submitted.
-func (c *client) SetEnvironment(environment string) {
+func (c *Client) SetEnvironment(environment string) {
 	c.configuration.environment = environment
 }
 
 // SetEndpoint sets the endpoint to post items to. This also configures the underlying Transport.
-func (c *client) SetEndpoint(endpoint string) {
+func (c *Client) SetEndpoint(endpoint string) {
 	c.configuration.endpoint = endpoint
 	c.Transport.SetEndpoint(endpoint)
 }
 
 // SetPlatform sets the platform to be reported for all items.
-func (c *client) SetPlatform(platform string) {
+func (c *Client) SetPlatform(platform string) {
 	c.configuration.platform = platform
 }
 
 // SetCodeVersion sets the string describing the running code version on the server.
-func (c *client) SetCodeVersion(codeVersion string) {
+func (c *Client) SetCodeVersion(codeVersion string) {
 	c.configuration.codeVersion = codeVersion
 }
 
 // SetServerHost sets the hostname sent with each item. This value will be indexed.
-func (c *client) SetServerHost(serverHost string) {
+func (c *Client) SetServerHost(serverHost string) {
 	c.configuration.serverHost = serverHost
 }
 
 // SetServerRoot sets the path to the application code root, not including the final slash.
 // This is used to collapse non-project code when displaying tracebacks.
-func (c *client) SetServerRoot(serverRoot string) {
+func (c *Client) SetServerRoot(serverRoot string) {
 	c.configuration.serverRoot = serverRoot
 }
 
 // SetCustom sets any arbitrary metadata you want to send with every item.
-func (c *client) SetCustom(custom map[string]interface{}) {
+func (c *Client) SetCustom(custom map[string]interface{}) {
 	c.configuration.custom = custom
 }
 
@@ -143,7 +143,7 @@ func WithPersonExtra(extra map[string]string) personOption {
 		p.Extra = extra
 	}
 }
-func (c *client) SetPerson(id, username, email string, opts ...personOption) {
+func (c *Client) SetPerson(id, username, email string, opts ...personOption) {
 	person := Person{
 		Id:       id,
 		Username: username,
@@ -160,7 +160,7 @@ func (c *client) SetPerson(id, username, email string, opts ...personOption) {
 
 // ClearPerson clears any previously set person information. See `SetPerson` for more
 // information.
-func (c *client) ClearPerson() {
+func (c *Client) ClearPerson() {
 	person := Person{}
 
 	c.configuration.person = person
@@ -168,25 +168,25 @@ func (c *client) ClearPerson() {
 
 // SetFingerprint sets whether or not to use a custom client-side fingerprint. The default value is
 // false.
-func (c *client) SetFingerprint(fingerprint bool) {
+func (c *Client) SetFingerprint(fingerprint bool) {
 	c.configuration.fingerprint = fingerprint
 }
 
 // SetLogger sets the logger on the underlying transport. By default log.Printf is used.
-func (c *client) SetLogger(logger ClientLogger) {
+func (c *Client) SetLogger(logger ClientLogger) {
 	c.Transport.SetLogger(logger)
 }
 
 // SetScrubHeaders sets the regular expression used to match headers for scrubbing.
 // The default value is regexp.MustCompile("Authorization")
-func (c *client) SetScrubHeaders(headers *regexp.Regexp) {
+func (c *Client) SetScrubHeaders(headers *regexp.Regexp) {
 	c.configuration.scrubHeaders = headers
 	c.Telemetry.Network.ScrubHeaders = headers
 }
 
 // SetScrubFields sets the regular expression to match keys in the item payload for scrubbing.
 // The default vlaue is regexp.MustCompile("password|secret|token"),
-func (c *client) SetScrubFields(fields *regexp.Regexp) {
+func (c *Client) SetScrubFields(fields *regexp.Regexp) {
 	c.configuration.scrubFields = fields
 }
 
@@ -201,22 +201,22 @@ func (c *client) SetScrubFields(fields *regexp.Regexp) {
 // described above. You can modify this object in-place to make any arbitrary changes you wish to
 // make before it is finally sent. Be careful with the modifications you make as they could lead to
 // the payload being malformed from the perspective of the API.
-func (c *client) SetTransform(transform func(map[string]interface{})) {
+func (c *Client) SetTransform(transform func(map[string]interface{})) {
 	c.configuration.transform = transform
 }
 
-// SetUnwrapper sets the UnwrapperFunc used by the client. The unwrapper function
+// SetUnwrapper sets the UnwrapperFunc used by the Client. The unwrapper function
 // is used to extract wrapped errors from enhanced error types. This feature can be used to add
 // support for custom error types that do not yet implement the Unwrap method specified in Go 1.13.
 // See the documentation of UnwrapperFunc for more details.
 //
 // In order to preserve the default unwrapping behavior, callers of SetUnwrapper may wish to include
 // a call to DefaultUnwrapper in their custom unwrapper function. See the example on the SetUnwrapper function.
-func (c *client) SetUnwrapper(unwrapper UnwrapperFunc) {
+func (c *Client) SetUnwrapper(unwrapper UnwrapperFunc) {
 	c.configuration.unwrapper = unwrapper
 }
 
-// SetStackTracer sets the StackTracerFunc used by the client. The stack tracer
+// SetStackTracer sets the StackTracerFunc used by the Client. The stack tracer
 // function is used to extract the stack trace from enhanced error types. This feature can be used
 // to add support for custom error types that do not implement the Stacker interface.
 // See the documentation of StackTracerFunc for more details.
@@ -224,7 +224,7 @@ func (c *client) SetUnwrapper(unwrapper UnwrapperFunc) {
 // In order to preserve the default stack tracing behavior, callers of SetStackTracer may wish
 // to include a call to DefaultStackTracer in their custom tracing function. See the example
 // on the SetStackTracer function.
-func (c *client) SetStackTracer(stackTracer StackTracerFunc) {
+func (c *Client) SetStackTracer(stackTracer StackTracerFunc) {
 	c.configuration.stackTracer = stackTracer
 }
 
@@ -234,7 +234,7 @@ func (c *client) SetStackTracer(stackTracer StackTracerFunc) {
 // report it to Rollbar. If an error is the argument to the panic, then
 // this function is called with the result of calling Error(), otherwise
 // the string representation of the value is passed to this function.
-func (c *client) SetCheckIgnore(checkIgnore func(string) bool) {
+func (c *Client) SetCheckIgnore(checkIgnore func(string) bool) {
 	c.configuration.checkIgnore = checkIgnore
 }
 
@@ -242,19 +242,19 @@ func (c *client) SetCheckIgnore(checkIgnore func(string) bool) {
 // CaptureIpFull means capture the entire address without any modification.
 // CaptureIpAnonymize means apply a pseudo-anonymization.
 // CaptureIpNone means do not capture anything.
-func (c *client) SetCaptureIp(captureIp captureIp) {
+func (c *Client) SetCaptureIp(captureIp captureIp) {
 	c.configuration.captureIp = captureIp
 }
 
 // SetRetryAttempts sets how many times to attempt to retry sending an item if the http transport
 // experiences temporary error conditions. By default this is equal to DefaultRetryAttempts.
 // Temporary errors include timeouts and rate limit responses.
-func (c *client) SetRetryAttempts(retryAttempts int) {
+func (c *Client) SetRetryAttempts(retryAttempts int) {
 	c.Transport.SetRetryAttempts(retryAttempts)
 }
 
 // SetItemsPerMinute sets the max number of items to send in a given minute
-func (c *client) SetItemsPerMinute(itemsPerMinute int) {
+func (c *Client) SetItemsPerMinute(itemsPerMinute int) {
 	c.configuration.itemsPerMinute = itemsPerMinute
 	c.Transport.SetItemsPerMinute(itemsPerMinute)
 }
@@ -263,81 +263,81 @@ func (c *client) SetItemsPerMinute(itemsPerMinute int) {
 // stderr if an error occurs during transport to the Rollbar API. For example, if you hit
 // your rate limit and we run out of retry attempts, then if this is true we will output the
 // item to stderr rather than the item disappearing completely.
-func (c *client) SetPrintPayloadOnError(printPayloadOnError bool) {
+func (c *Client) SetPrintPayloadOnError(printPayloadOnError bool) {
 	c.Transport.SetPrintPayloadOnError(printPayloadOnError)
 }
 
-// SetHTTPClient sets custom http client. http.DefaultClient is used by default
-func (c *client) SetHTTPClient(httpClient *http.Client) {
+// SetHTTPClient sets custom http Client. http.DefaultClient is used by default
+func (c *Client) SetHTTPClient(httpClient *http.Client) {
 	c.Transport.SetHTTPClient(httpClient)
 }
 
 // Token is the currently set Rollbar access token.
-func (c *client) Token() string {
+func (c *Client) Token() string {
 	return c.configuration.token
 }
 
 // ItemsPerMinute is the currently set Rollbar items per minute
-func (c *client) ItemsPerMinute() int {
+func (c *Client) ItemsPerMinute() int {
 	return c.configuration.itemsPerMinute
 }
 
 // Environment is the currently set environment underwhich all errors and
 // messages will be submitted.
-func (c *client) Environment() string {
+func (c *Client) Environment() string {
 	return c.configuration.environment
 }
 
 // Endpoint is the currently set endpoint used for posting items.
-func (c *client) Endpoint() string {
+func (c *Client) Endpoint() string {
 	return c.configuration.endpoint
 }
 
 // Platform is the currently set platform reported for all Rollbar items. The default is
 // the running operating system (darwin, freebsd, linux, etc.) but it can
-// also be application specific (client, heroku, etc.).
-func (c *client) Platform() string {
+// also be application specific (Client, heroku, etc.).
+func (c *Client) Platform() string {
 	return c.configuration.platform
 }
 
 // CodeVersion is the currently set string describing the running code version on the server.
-func (c *client) CodeVersion() string {
+func (c *Client) CodeVersion() string {
 	return c.configuration.codeVersion
 }
 
 // ServerHost is the currently set server hostname. This value will be indexed.
-func (c *client) ServerHost() string {
+func (c *Client) ServerHost() string {
 	return c.configuration.serverHost
 }
 
 // ServerRoot is the currently set path to the application code root, not including the final slash.
 // This is used to collapse non-project code when displaying tracebacks.
-func (c *client) ServerRoot() string {
+func (c *Client) ServerRoot() string {
 	return c.configuration.serverRoot
 }
 
 // Custom is the currently set arbitrary metadata you want to send with every subsequently sent item.
-func (c *client) Custom() map[string]interface{} {
+func (c *Client) Custom() map[string]interface{} {
 	return c.configuration.custom
 }
 
 // Fingerprint specifies whether or not to use a custom client-side fingerprint.
-func (c *client) Fingerprint() bool {
+func (c *Client) Fingerprint() bool {
 	return c.configuration.fingerprint
 }
 
 // ScrubHeaders is the currently set regular expression used to match headers for scrubbing.
-func (c *client) ScrubHeaders() *regexp.Regexp {
+func (c *Client) ScrubHeaders() *regexp.Regexp {
 	return c.configuration.scrubHeaders
 }
 
 // ScrubFields is the currently set regular expression to match keys in the item payload for scrubbing.
-func (c *client) ScrubFields() *regexp.Regexp {
+func (c *Client) ScrubFields() *regexp.Regexp {
 	return c.configuration.scrubFields
 }
 
 // CaptureIp is the currently set level of IP address information to capture from requests.
-func (c *client) CaptureIp() captureIp {
+func (c *Client) CaptureIp() captureIp {
 	return c.configuration.captureIp
 }
 
@@ -346,63 +346,63 @@ func (c *client) CaptureIp() captureIp {
 var noExtras map[string]interface{}
 
 // ErrorWithLevel sends an error to Rollbar with the given severity level.
-func (c *client) ErrorWithLevel(level string, err error) {
+func (c *Client) ErrorWithLevel(level string, err error) {
 	c.ErrorWithExtras(level, err, noExtras)
 }
 
 // Errorf sends an error to Rollbar with the given format string and arguments.
-func (c *client) Errorf(level string, format string, args ...interface{}) {
+func (c *Client) Errorf(level string, format string, args ...interface{}) {
 	c.ErrorWithStackSkipWithExtras(level, fmt.Errorf(format, args...), 1, noExtras)
 }
 
 // ErrorWithExtras sends an error to Rollbar with the given severity
 // level with extra custom data.
-func (c *client) ErrorWithExtras(level string, err error, extras map[string]interface{}) {
+func (c *Client) ErrorWithExtras(level string, err error, extras map[string]interface{}) {
 	c.ErrorWithStackSkipWithExtras(level, err, 1, extras)
 }
 
 // ErrorWithExtrasAndContext sends an error to Rollbar with the given severity
 // level with extra custom data, within the given context.
-func (c *client) ErrorWithExtrasAndContext(ctx context.Context, level string, err error, extras map[string]interface{}) {
+func (c *Client) ErrorWithExtrasAndContext(ctx context.Context, level string, err error, extras map[string]interface{}) {
 	c.ErrorWithStackSkipWithExtrasAndContext(ctx, level, err, 1, extras)
 }
 
 // RequestError sends an error to Rollbar with the given severity level
 // and request-specific information.
-func (c *client) RequestError(level string, r *http.Request, err error) {
+func (c *Client) RequestError(level string, r *http.Request, err error) {
 	c.RequestErrorWithExtras(level, r, err, noExtras)
 }
 
 // RequestErrorWithExtras sends an error to Rollbar with the given
 // severity level and request-specific information with extra custom data.
-func (c *client) RequestErrorWithExtras(level string, r *http.Request, err error, extras map[string]interface{}) {
+func (c *Client) RequestErrorWithExtras(level string, r *http.Request, err error, extras map[string]interface{}) {
 	c.RequestErrorWithStackSkipWithExtras(level, r, err, 1, extras)
 }
 
 // RequestErrorWithExtrasAndContext sends an error to Rollbar with the given
 // severity level and request-specific information with extra custom data, within the given
 // context.
-func (c *client) RequestErrorWithExtrasAndContext(ctx context.Context, level string, r *http.Request, err error, extras map[string]interface{}) {
+func (c *Client) RequestErrorWithExtrasAndContext(ctx context.Context, level string, r *http.Request, err error, extras map[string]interface{}) {
 	c.RequestErrorWithStackSkipWithExtrasAndContext(ctx, level, r, err, 1, extras)
 }
 
 // ErrorWithStackSkip sends an error to Rollbar with the given severity
 // level and a given number of stack trace frames skipped.
-func (c *client) ErrorWithStackSkip(level string, err error, skip int) {
+func (c *Client) ErrorWithStackSkip(level string, err error, skip int) {
 	c.ErrorWithStackSkipWithExtras(level, err, skip, noExtras)
 }
 
 // ErrorWithStackSkipWithExtras sends an error to Rollbar with the given
 // severity level and a given number of stack trace frames skipped with
 // extra custom data.
-func (c *client) ErrorWithStackSkipWithExtras(level string, err error, skip int, extras map[string]interface{}) {
+func (c *Client) ErrorWithStackSkipWithExtras(level string, err error, skip int, extras map[string]interface{}) {
 	c.ErrorWithStackSkipWithExtrasAndContext(context.TODO(), level, err, skip, extras)
 }
 
 // ErrorWithStackSkipWithExtrasAndContext sends an error to Rollbar with the given
 // severity level and a given number of stack trace frames skipped with
 // extra custom data, within the given context.
-func (c *client) ErrorWithStackSkipWithExtrasAndContext(ctx context.Context, level string, err error, skip int, extras map[string]interface{}) {
+func (c *Client) ErrorWithStackSkipWithExtrasAndContext(ctx context.Context, level string, err error, skip int, extras map[string]interface{}) {
 	if !c.configuration.enabled {
 		return
 	}
@@ -415,7 +415,7 @@ func (c *client) ErrorWithStackSkipWithExtrasAndContext(ctx context.Context, lev
 // RequestErrorWithStackSkip sends an error to Rollbar with the given
 // severity level and a given number of stack trace frames skipped, in
 // addition to extra request-specific information.
-func (c *client) RequestErrorWithStackSkip(level string, r *http.Request, err error, skip int) {
+func (c *Client) RequestErrorWithStackSkip(level string, r *http.Request, err error, skip int) {
 	c.RequestErrorWithStackSkipWithExtras(level, r, err, skip, noExtras)
 }
 
@@ -423,7 +423,7 @@ func (c *client) RequestErrorWithStackSkip(level string, r *http.Request, err er
 // the given severity level and a given number of stack trace frames
 // skipped, in addition to extra request-specific information and extra
 // custom data.
-func (c *client) RequestErrorWithStackSkipWithExtras(level string, r *http.Request, err error, skip int, extras map[string]interface{}) {
+func (c *Client) RequestErrorWithStackSkipWithExtras(level string, r *http.Request, err error, skip int, extras map[string]interface{}) {
 	c.RequestErrorWithStackSkipWithExtrasAndContext(context.TODO(), level, r, err, skip, extras)
 }
 
@@ -431,7 +431,7 @@ func (c *client) RequestErrorWithStackSkipWithExtras(level string, r *http.Reque
 // the given severity level and a given number of stack trace frames
 // skipped, in addition to extra request-specific information and extra
 // custom data, within the given context.
-func (c *client) RequestErrorWithStackSkipWithExtrasAndContext(ctx context.Context, level string, r *http.Request, err error, skip int, extras map[string]interface{}) {
+func (c *Client) RequestErrorWithStackSkipWithExtrasAndContext(ctx context.Context, level string, r *http.Request, err error, skip int, extras map[string]interface{}) {
 	if !c.configuration.enabled {
 		return
 	}
@@ -445,19 +445,19 @@ func (c *client) RequestErrorWithStackSkipWithExtrasAndContext(ctx context.Conte
 // -- Message reporting
 
 // Message sends a message to Rollbar with the given severity level.
-func (c *client) Message(level string, msg string) {
+func (c *Client) Message(level string, msg string) {
 	c.MessageWithExtras(level, msg, noExtras)
 }
 
 // MessageWithExtras sends a message to Rollbar with the given severity
 // level with extra custom data.
-func (c *client) MessageWithExtras(level string, msg string, extras map[string]interface{}) {
+func (c *Client) MessageWithExtras(level string, msg string, extras map[string]interface{}) {
 	c.MessageWithExtrasAndContext(context.TODO(), level, msg, extras)
 }
 
 // MessageWithExtrasAndContext sends a message to Rollbar with the given severity
 // level with extra custom data, within the given context.
-func (c *client) MessageWithExtrasAndContext(ctx context.Context, level string, msg string, extras map[string]interface{}) {
+func (c *Client) MessageWithExtrasAndContext(ctx context.Context, level string, msg string, extras map[string]interface{}) {
 	if !c.configuration.enabled {
 		return
 	}
@@ -472,20 +472,20 @@ func (c *client) MessageWithExtrasAndContext(ctx context.Context, level string,
 
 // RequestMessage sends a message to Rollbar with the given severity level
 // and request-specific information.
-func (c *client) RequestMessage(level string, r *http.Request, msg string) {
+func (c *Client) RequestMessage(level string, r *http.Request, msg string) {
 	c.RequestMessageWithExtras(level, r, msg, noExtras)
 }
 
 // RequestMessageWithExtras sends a message to Rollbar with the given
 // severity level and request-specific information with extra custom data.
-func (c *client) RequestMessageWithExtras(level string, r *http.Request, msg string, extras map[string]interface{}) {
+func (c *Client) RequestMessageWithExtras(level string, r *http.Request, msg string, extras map[string]interface{}) {
 	c.RequestMessageWithExtrasAndContext(context.TODO(), level, r, msg, extras)
 }
 
 // RequestMessageWithExtrasAndContext sends a message to Rollbar with the given
 // severity level and request-specific information with extra custom data, within the given
 // context.
-func (c *client) RequestMessageWithExtrasAndContext(ctx context.Context, level string, r *http.Request, msg string, extras map[string]interface{}) {
+func (c *Client) RequestMessageWithExtrasAndContext(ctx context.Context, level string, r *http.Request, msg string, extras map[string]interface{}) {
 	if !c.configuration.enabled {
 		return
 	}
@@ -503,7 +503,7 @@ func (c *client) RequestMessageWithExtrasAndContext(ctx context.Context, level s
 
 // LogPanic accepts an error value returned by recover() and
 // handles logging to Rollbar with stack info.
-func (c *client) LogPanic(err interface{}, wait bool) {
+func (c *Client) LogPanic(err interface{}, wait bool) {
 	switch val := err.(type) {
 	case nil:
 		return
@@ -529,7 +529,7 @@ func (c *client) LogPanic(err interface{}, wait bool) {
 // If wait is true, this also waits before returning to ensure the message was reported.
 // If an error is captured it is subsequently returned.
 // WrapWithArgs is compatible with any return type for f, but does not return its return value(s).
-func (c *client) WrapWithArgs(f interface{}, wait bool, inArgs ...interface{}) (err interface{}) {
+func (c *Client) WrapWithArgs(f interface{}, wait bool, inArgs ...interface{}) (err interface{}) {
 	if f == nil {
 		err = fmt.Errorf("function is nil")
 		return
@@ -563,21 +563,21 @@ func (c *client) WrapWithArgs(f interface{}, wait bool, inArgs ...interface{}) (
 
 // Wrap calls f and then recovers and reports a panic to Rollbar if it occurs.
 // If an error is captured it is subsequently returned.
-func (c *client) Wrap(f interface{}, args ...interface{}) (err interface{}) {
+func (c *Client) Wrap(f interface{}, args ...interface{}) (err interface{}) {
 	return c.WrapWithArgs(f, false, args...)
 }
 
 // WrapAndWait calls f, and recovers and reports a panic to Rollbar if it occurs.
 // This also waits before returning to ensure the message was reported
 // If an error is captured it is subsequently returned.
-func (c *client) WrapAndWait(f interface{}, args ...interface{}) (err interface{}) {
+func (c *Client) WrapAndWait(f interface{}, args ...interface{}) (err interface{}) {
 	return c.WrapWithArgs(f, true, args...)
 }
 
 // LambdaWrapper calls handlerFunc with arguments, and recovers and reports a
 // panic to Rollbar if it occurs. This functions as a passthrough wrapper for
 // lambda.Start(). This also waits before returning to ensure all messages completed.
-func (c *client) LambdaWrapper(handlerFunc interface{}) interface{} {
+func (c *Client) LambdaWrapper(handlerFunc interface{}) interface{} {
 	if handlerFunc == nil {
 		return lambdaErrorHandler(fmt.Errorf("handler is nil"))
 	}
@@ -618,26 +618,26 @@ func lambdaErrorHandler(e error) lambdaHandler {
 // transport then this will block until the queue of
 // errors / messages is empty. If using a synchronous transport then there
 // is no queue so this will be a no-op.
-func (c *client) Wait() {
+func (c *Client) Wait() {
 	c.Transport.Wait()
 }
 
 // Close delegates to the Close method of the Transport. For the asynchronous
 // transport this is an alias for Wait, and is a no-op for the synchronous
 // transport.
-func (c *client) Close() error {
+func (c *Client) Close() error {
 	return c.Transport.Close()
 }
 
-func (c *client) buildBody(ctx context.Context, level, title string, extras map[string]interface{}) map[string]interface{} {
+func (c *Client) buildBody(ctx context.Context, level, title string, extras map[string]interface{}) map[string]interface{} {
 	return buildBody(ctx, c.configuration, c.diagnostic, level, title, extras)
 }
 
-func (c *client) requestDetails(r *http.Request) map[string]interface{} {
+func (c *Client) requestDetails(r *http.Request) map[string]interface{} {
 	return requestDetails(c.configuration, r)
 }
 
-func (c *client) push(body map[string]interface{}) error {
+func (c *Client) push(body map[string]interface{}) error {
 	data := body["data"].(map[string]interface{})
 	c.configuration.transform(data)
 	return c.Transport.Send(body)
diff --git a/rollbar.go b/rollbar.go
index 51bf1a7..e68270e 100644
--- a/rollbar.go
+++ b/rollbar.go
@@ -39,7 +39,7 @@ var (
 // An UnwrapperFunc is used to extract wrapped errors when building an error chain. It should return
 // the wrapped error if available, or nil otherwise.
 //
-// The client will use DefaultUnwrapper by default, and a user can override the default behavior
+// The Client will use DefaultUnwrapper by default, and a user can override the default behavior
 // by calling SetUnwrapper. See SetUnwrapper for more details.
 type UnwrapperFunc func(error) error
 
@@ -48,7 +48,7 @@ type UnwrapperFunc func(error) error
 // whether the function was able to extract a stack trace (even if the extracted stack trace was
 // empty or nil).
 //
-// The client will use DefaultStackTracer by default, and a user can override the default
+// The Client will use DefaultStackTracer by default, and a user can override the default
 // behavior by calling SetStackTracer. See SetStackTracer for more details.
 type StackTracerFunc func(error) ([]runtime.Frame, bool)
 
@@ -100,7 +100,7 @@ func CaptureTelemetryEvent(eventType, eventlevel string, eventData map[string]in
 	std.CaptureTelemetryEvent(eventType, eventlevel, eventData)
 }
 
-// SetEnabled sets whether or not the managed client instance is enabled.
+// SetEnabled sets whether or not the managed Client instance is enabled.
 // If this is true then this library works as normal.
 // If this is false then no calls will be made to the network.
 // One place where this is useful is for turning off reporting in tests.
@@ -108,20 +108,20 @@ func SetEnabled(enabled bool) {
 	std.SetEnabled(enabled)
 }
 
-// SetToken sets the token on the managed client instance. The value is a Rollbar access token
+// SetToken sets the token on the managed Client instance. The value is a Rollbar access token
 // with scope "post_server_item". It is required to set this value before any of the other
 // functions herein will be able to work properly.
 func SetToken(token string) {
 	std.SetToken(token)
 }
 
-// SetEnvironment sets the environment on the managed client instance.
+// SetEnvironment sets the environment on the managed Client instance.
 // All errors and messages will be submitted under this environment.
 func SetEnvironment(environment string) {
 	std.SetEnvironment(environment)
 }
 
-// SetEndpoint sets the endpoint on the managed client instance.
+// SetEndpoint sets the endpoint on the managed Client instance.
 // The endpoint to post items to.
 // The default value is https://api.rollbar.com/api/1/item/
 func SetEndpoint(endpoint string) {
@@ -133,47 +133,47 @@ func SetItemsPerMinute(itemsPerMinute int) {
 	std.SetItemsPerMinute(itemsPerMinute)
 }
 
-// SetPlatform sets the platform on the managed client instance.
+// SetPlatform sets the platform on the managed Client instance.
 // The platform is reported for all Rollbar items. The default is
 // the running operating system (darwin, freebsd, linux, etc.) but it can
-// also be application specific (client, heroku, etc.).
+// also be application specific (Client, heroku, etc.).
 func SetPlatform(platform string) {
 	std.SetPlatform(platform)
 }
 
-// SetCodeVersion sets the code version on the managed client instance.
+// SetCodeVersion sets the code version on the managed Client instance.
 // The code version is a string describing the running code version on the server.
 func SetCodeVersion(codeVersion string) {
 	std.SetCodeVersion(codeVersion)
 }
 
-// SetServerHost sets the host value on the managed client instance.
+// SetServerHost sets the host value on the managed Client instance.
 // Server host is the hostname sent with all Rollbar items. The value will be indexed.
 func SetServerHost(serverHost string) {
 	std.SetServerHost(serverHost)
 }
 
-// SetServerRoot sets the code root value on the managed client instance.
+// SetServerRoot sets the code root value on the managed Client instance.
 // Path to the application code root, not including the final slash.
 // Used to collapse non-project code when displaying tracebacks.
 func SetServerRoot(serverRoot string) {
 	std.SetServerRoot(serverRoot)
 }
 
-// SetCustom sets custom data on the managed client instance.
+// SetCustom sets custom data on the managed Client instance.
 // The data set is any arbitrary metadata you want to send with every subsequently sent item.
 func SetCustom(custom map[string]interface{}) {
 	std.SetCustom(custom)
 }
 
-// SetScrubHeaders sets the headers to scrub on the managed client instance.
+// SetScrubHeaders sets the headers to scrub on the managed Client instance.
 // The value is a regular expression used to match headers for scrubbing.
 // The default value is regexp.MustCompile("Authorization").
 func SetScrubHeaders(headers *regexp.Regexp) {
 	std.SetScrubHeaders(headers)
 }
 
-// SetScrubFields sets the fields to scrub on the managed client instance.
+// SetScrubFields sets the fields to scrub on the managed Client instance.
 // The value is a regular expression to match keys in the item payload for scrubbing.
 // The default vlaue is regexp.MustCompile("password|secret|token").
 func SetScrubFields(fields *regexp.Regexp) {
@@ -195,7 +195,7 @@ func SetTransform(transform func(map[string]interface{})) {
 	std.SetTransform(transform)
 }
 
-// SetUnwrapper sets the UnwrapperFunc used by the managed client instance. The unwrapper function
+// SetUnwrapper sets the UnwrapperFunc used by the managed Client instance. The unwrapper function
 // is used to extract wrapped errors from enhanced error types. This feature can be used to add
 // support for custom error types that do not yet implement the Unwrap method specified in Go 1.13.
 // See the documentation of UnwrapperFunc for more details.
@@ -206,7 +206,7 @@ func SetUnwrapper(unwrapper UnwrapperFunc) {
 	std.SetUnwrapper(unwrapper)
 }
 
-// SetStackTracer sets the StackTracerFunc used by the managed client instance. The stack tracer
+// SetStackTracer sets the StackTracerFunc used by the managed Client instance. The stack tracer
 // function is used to extract the stack trace from enhanced error types. This feature can be used
 // to add support for custom error types that do not implement the Stacker interface.
 // See the documentation of StackTracerFunc for more details.
@@ -217,7 +217,7 @@ func SetStackTracer(stackTracer StackTracerFunc) {
 	std.SetStackTracer(stackTracer)
 }
 
-// SetCheckIgnore sets the checkIgnore function on the managed client instance.
+// SetCheckIgnore sets the checkIgnore function on the managed Client instance.
 // CheckIgnore is called during the recovery process of a panic that
 // occurred inside a function wrapped by Wrap or WrapAndWait.
 // Return true if you wish to ignore this panic, false if you wish to
@@ -240,7 +240,7 @@ func ClearPerson() {
 	std.ClearPerson()
 }
 
-// SetFingerprint sets whether or not to use custom client-side fingerprinting on the managed client
+// SetFingerprint sets whether or not to use custom client-side fingerprinting on the managed Client
 // instance. This custom fingerprinting is based on a CRC32 checksum. The alternative is to let
 // the server compute a fingerprint for each item. The default is false.
 func SetFingerprint(fingerprint bool) {
@@ -248,7 +248,7 @@ func SetFingerprint(fingerprint bool) {
 }
 
 // SetLogger sets an alternative logger to be used by the underlying transport layer on the managed
-// client instance.
+// Client instance.
 func SetLogger(logger ClientLogger) {
 	std.SetLogger(logger)
 }
@@ -277,60 +277,60 @@ func SetPrintPayloadOnError(printPayloadOnError bool) {
 	std.SetPrintPayloadOnError(printPayloadOnError)
 }
 
-// SetHTTPClient sets custom http client. http.DefaultClient is used by default
+// SetHTTPClient sets custom http Client. http.DefaultClient is used by default
 func SetHTTPClient(httpClient *http.Client) {
 	std.SetHTTPClient(httpClient)
 }
 
 // -- Getters
 
-// Token returns the currently set Rollbar access token on the managed client instance.
+// Token returns the currently set Rollbar access token on the managed Client instance.
 func Token() string {
 	return std.Token()
 }
 
-// Environment is the environment currently set on the managed client instance.
+// Environment is the environment currently set on the managed Client instance.
 func Environment() string {
 	return std.Environment()
 }
 
-// Endpoint is the currently configured endpoint to send items on the managed client instance.
+// Endpoint is the currently configured endpoint to send items on the managed Client instance.
 func Endpoint() string {
 	return std.Endpoint()
 }
 
 // Platform is the platform reported for all Rollbar items. The default is
 // the running operating system (darwin, freebsd, linux, etc.) but it can
-// also be application specific (client, heroku, etc.).
+// also be application specific (Client, heroku, etc.).
 func Platform() string {
 	return std.Platform()
 }
 
 // CodeVersion is the string describing the running code version on the server that is currently set
-// on the managed client instance.
+// on the managed Client instance.
 func CodeVersion() string {
 	return std.CodeVersion()
 }
 
-// ServerHost is the currently set hostname on the managed client instance. The value will be
+// ServerHost is the currently set hostname on the managed Client instance. The value will be
 // indexed.
 func ServerHost() string {
 	return std.ServerHost()
 }
 
-// ServerRoot is the currently set path to the code root set on the managed client instance.
+// ServerRoot is the currently set path to the code root set on the managed Client instance.
 // This should be a path to the application code root, not including the final slash.
 // It is used to collapse non-project code when displaying tracebacks.
 func ServerRoot() string {
 	return std.ServerRoot()
 }
 
-// Custom is the currently set extra metadata on the managed client instance.
+// Custom is the currently set extra metadata on the managed Client instance.
 func Custom() map[string]interface{} {
 	return std.Custom()
 }
 
-// Fingerprint is whether or not the current managed client instance uses a custom client-side
+// Fingerprint is whether or not the current managed Client instance uses a custom client-side
 // fingerprint. The default is false.
 func Fingerprint() bool {
 	return std.Fingerprint()


Test patch:
diff --git a/client_test.go b/client_test.go
index a843771..ee7eea4 100644
--- a/client_test.go
+++ b/client_test.go
@@ -36,7 +36,7 @@ func (t *TestTransport) Send(body map[string]interface{}) error {
 	return nil
 }
 
-func testClient() *client {
+func testClient() *Client {
 	c := New("", "test", "", "", "")
 	c.Transport = &TestTransport{}
 	return c
@@ -412,7 +412,7 @@ func TestGettersAndSetters_Sync(t *testing.T) {
 	testGettersAndSetters(c, t)
 }
 
-func testGettersAndSetters(client *client, t *testing.T) {
+func testGettersAndSetters(client *Client, t *testing.T) {
 	token := "abc123"
 	environment := "TestEnvironment"
 	endpoint := "SomeEndpoint"
diff --git a/rollbar_test.go b/rollbar_test.go
index 5162d89..83bf58f 100644
--- a/rollbar_test.go
+++ b/rollbar_test.go
@@ -161,7 +161,7 @@ func TestBuildBody(t *testing.T) {
 		"EXTRA_CUSTOM_KEY":      "EXTRA_CUSTOM_VALUE",
 		"OVERRIDDEN_CUSTOM_KEY": "EXTRA",
 	}
-	body := interface{}(std).(*client).buildBody(context.TODO(), ERR, "test error", extraCustom)
+	body := interface{}(std).(*Client).buildBody(context.TODO(), ERR, "test error", extraCustom)
 
 	if body["data"] == nil {
 		t.Error("body should have data")
@@ -190,7 +190,7 @@ func TestBuildBodyNoBaseCustom(t *testing.T) {
 		"EXTRA_CUSTOM_KEY":      "EXTRA_CUSTOM_VALUE",
 		"OVERRIDDEN_CUSTOM_KEY": "EXTRA",
 	}
-	body := interface{}(std).(*client).buildBody(context.TODO(), ERR, "test error", extraCustom)
+	body := interface{}(std).(*Client).buildBody(context.TODO(), ERR, "test error", extraCustom)
 
 	if body["data"] == nil {
 		t.Error("body should have data")