Comments (1)
So ultimately, this boils down to the Go paradigm, "accept interfaces, return structs".
I think it's extremely valuable for go-agent to receive Transaction interfaces, it allows me to do injection-based testing or wrap the underlying transaction struct to extend the functionality.
The methods that the internal library uses on a transaction (things like SetWebRequest()
et al) should be on the interface. User-land helper methods (like Application()
should be on the struct). For the most part, this lets you maintain compatibility (though I would definitely suggest a big interface refactor before going to v3, so you present a minimally implemented interface).
This is similar to option 3, but is a much heavier refactor, but it allows you to maintain compatibility in the future. (an example of this might be net/http's RoundTripper
vs. Transport
).
You could also just not use go modules and just stay an incompatible package.
I definitely think major version bumps every time is a huge no-go though.
from go-agent.
Related Issues (20)
- report transactions https api "Total count" is wrong
- Using logrus JSON formatter with logcontext-v2 HOT 2
- internal/jsonx.AppendString causing panic in v3.20.0 HOT 12
- Context propagation with B3 Headers + Gin HOT 1
- Change mssql driver to official driver: github.com/microsoft/go-mssqldb HOT 1
- Compression Memory Leak HOT 4
- [Repolinter] Open Source Policy Issues
- Add Support for `go-redis` v9 HOT 1
- Panic in agent v3.20.3 HOT 7
- Mixing nrlambda.Wrap and newrelic.WrapHandle
- Delete old v2 code HOT 1
- Skip fetching location if CLM is disabled HOT 4
- Distributed Tracer Reservoir Limit Not Being Used HOT 2
- Switch from labels to tags HOT 3
- Add pack for Go Kit framework
- [Repolinter] Open Source Policy Issues
- logcontext-v2 does not work with Serverless / nrlambda HOT 11
- Expose integrationsupport and internal HOT 2
- Logrus Hook for Error noticing HOT 1
- add getter for transaction name HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-agent.