Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
<a name="v2.62.0"></a>
## [v2.62.0] - 2025-06-13
### Features
- **cloud:** added auto-discovery slug to cloud configure integration api ([#1307](https://github.com/newrelic/newrelic-client-go/issues/1307))

<a name="v2.61.2"></a>
## [v2.61.2] - 2025-06-09
### Bug Fixes
- fixed a distributed tracing bug in the browser package ([#1304](https://github.com/newrelic/newrelic-client-go/issues/1304))
- **build:** add PR checks similar to Terraform, fix failing tests, broken code and obsolete deps ([#1295](https://github.com/newrelic/newrelic-client-go/issues/1295))

<a name="v2.61.1"></a>
## [v2.61.1] - 2025-05-26
### Bug Fixes
Expand Down Expand Up @@ -2043,7 +2054,9 @@
- extract paging implementation
- rename packages for clarity, promote Config to the public package

[Unreleased]: https://github.com/newrelic/newrelic-client-go/compare/v2.61.1...HEAD
[Unreleased]: https://github.com/newrelic/newrelic-client-go/compare/v2.62.0...HEAD
[v2.62.0]: https://github.com/newrelic/newrelic-client-go/compare/v2.61.2...v2.62.0
[v2.61.2]: https://github.com/newrelic/newrelic-client-go/compare/v2.61.1...v2.61.2
[v2.61.1]: https://github.com/newrelic/newrelic-client-go/compare/v2.61.0...v2.61.1
[v2.61.0]: https://github.com/newrelic/newrelic-client-go/compare/v2.60.0...v2.61.0
[v2.60.0]: https://github.com/newrelic/newrelic-client-go/compare/v2.59.0...v2.60.0
Expand Down
2 changes: 1 addition & 1 deletion internal/version/version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package version

// Version of this library
const Version string = "2.61.1"
const Version string = "2.62.0"
59 changes: 55 additions & 4 deletions pkg/agentapplications/agentapplications_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func TestIntegrationAgentApplicationBrowser_Basic(t *testing.T) {
require.True(t, deleteResult.Success)
}

func TestIntegrationAgentApplicationBrowser_WithSettings(t *testing.T) {
func TestIntegrationAgentApplicationBrowser_EnableThenDisableSettings(t *testing.T) {
t.Parallel()

testAccountID, err := testhelpers.GetTestAccountID()
Expand All @@ -57,9 +57,10 @@ func TestIntegrationAgentApplicationBrowser_WithSettings(t *testing.T) {
client := newAgentApplicationIntegrationTestClient(t)
appName := testhelpers.GenerateRandomName(10)
cookiesEnabled := true
distributedTracingEnabled := true
settings := AgentApplicationBrowserSettingsInput{
CookiesEnabled: &cookiesEnabled,
DistributedTracingEnabled: true,
DistributedTracingEnabled: &distributedTracingEnabled,
LoaderType: AgentApplicationBrowserLoaderTypes.LITE,
}

Expand Down Expand Up @@ -93,6 +94,54 @@ func TestIntegrationAgentApplicationBrowser_WithSettings(t *testing.T) {
require.True(t, deleteResult.Success)
}

func TestIntegrationAgentApplicationBrowser_DisableThenEnableSettings(t *testing.T) {
t.Parallel()

testAccountID, err := testhelpers.GetTestAccountID()
if err != nil {
t.Skipf("%s", err)
}

client := newAgentApplicationIntegrationTestClient(t)
appName := testhelpers.GenerateRandomName(10)
cookiesEnabled := false
distributedTracingEnabled := false
settings := AgentApplicationBrowserSettingsInput{
CookiesEnabled: &cookiesEnabled,
DistributedTracingEnabled: &distributedTracingEnabled,
LoaderType: AgentApplicationBrowserLoaderTypes.LITE,
}

// Create
createResult, err := client.AgentApplicationCreateBrowser(testAccountID, appName, settings)
require.NoError(t, err)
require.NotNil(t, createResult)
require.Equal(t, appName, createResult.Name)

cookiesEnabled = true
// Update
updateSettings := AgentApplicationSettingsUpdateInput{
BrowserMonitoring: &AgentApplicationSettingsBrowserMonitoringInput{
Loader: &AgentApplicationSettingsBrowserLoaderInputTypes.PRO,
DistributedTracing: &AgentApplicationSettingsBrowserDistributedTracingInput{
Enabled: true,
},
Privacy: &AgentApplicationSettingsBrowserPrivacyInput{
CookiesEnabled: &cookiesEnabled,
},
},
}
updateResult, err := client.AgentApplicationSettingsUpdate(createResult.GUID, updateSettings)
require.NoError(t, err)
require.NotNil(t, updateResult)

// Delete
deleteResult, err := client.AgentApplicationDelete(createResult.GUID)
require.NoError(t, err)
require.NotNil(t, deleteResult)
require.True(t, deleteResult.Success)
}

func TestIntegrationAgentApplicationBrowser_InvalidLoaderTypeInput(t *testing.T) {
t.Parallel()

Expand All @@ -104,9 +153,10 @@ func TestIntegrationAgentApplicationBrowser_InvalidLoaderTypeInput(t *testing.T)
client := newAgentApplicationIntegrationTestClient(t)
appName := testhelpers.GenerateRandomName(10)
cookiesEnabled := true
distributedTracingEnabled := true
settings := AgentApplicationBrowserSettingsInput{
CookiesEnabled: &cookiesEnabled,
DistributedTracingEnabled: true,
DistributedTracingEnabled: &distributedTracingEnabled,
LoaderType: AgentApplicationBrowserLoader("INVALID"),
}

Expand All @@ -132,10 +182,11 @@ func TestIntegrationAgentApplicationEnableAPMBrowser_WithSettings(t *testing.T)
t.Parallel()

cookiesEnabled := true
distributedTracingEnabled := true
client := newAgentApplicationIntegrationTestClient(t)
settings := AgentApplicationBrowserSettingsInput{
CookiesEnabled: &cookiesEnabled,
DistributedTracingEnabled: true,
DistributedTracingEnabled: &distributedTracingEnabled,
LoaderType: AgentApplicationBrowserLoaderTypes.PRO,
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/agentapplications/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
RUM: "RUM",
// Pro+SPA: This is the default installed agent when you enable browser monitoring. Gives you access to all of the Browser Pro features and to Single Page App (SPA) monitoring. Provides detailed page timing data and the most up-to-date New Relic features, including distributed tracing, for all types of applications.
SPA: "SPA",
// This value is specified for backwards-compatability.

Check failure on line 70 in pkg/agentapplications/types.go

View workflow job for this annotation

GitHub Actions / lint

"compatability" is a misspelling of "compatibility"

Check failure on line 70 in pkg/agentapplications/types.go

View workflow job for this annotation

GitHub Actions / lint

"compatability" is a misspelling of "compatibility"
XHR: "XHR",
}

Expand Down Expand Up @@ -233,7 +233,7 @@
// Configure cookies. The default is enabled: true.
CookiesEnabled *bool `json:"cookiesEnabled,omitempty"`
// Configure distributed tracing in browser apps. The default is enabled: true.
DistributedTracingEnabled bool `json:"distributedTracingEnabled,omitempty"`
DistributedTracingEnabled *bool `json:"distributedTracingEnabled,omitempty"`
// Determines which browser loader is configured. The default is "SPA".
LoaderType AgentApplicationBrowserLoader `json:"loaderType,omitempty"`
}
Expand Down
24 changes: 24 additions & 0 deletions pkg/cloud/cloud_api.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 50 additions & 0 deletions pkg/cloud/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,8 @@ type CloudAwsDisableIntegrationsInput struct {
AwsWafv2 []CloudDisableAccountIntegrationInput `json:"awsWafv2,omitempty"`
// X-Ray integration
AwsXray []CloudDisableAccountIntegrationInput `json:"awsXray,omitempty"`
// Auto Discovery integration
AwsAutoDiscovery []CloudDisableAccountIntegrationInput `json:"awsAutoDiscovery,omitempty"`
// Billing integration
Billing []CloudDisableAccountIntegrationInput `json:"billing,omitempty"`
// CloudFront integration
Expand Down Expand Up @@ -843,6 +845,8 @@ type CloudAwsIntegrationsInput struct {
AwsWafv2 []CloudAwsWafv2IntegrationInput `json:"awsWafv2,omitempty"`
// X-Ray integration
AwsXray []CloudAwsXrayIntegrationInput `json:"awsXray,omitempty"`
// Aws Auto Discovery Integration
AwsAutoDiscovery []CloudAwsAutoDiscoveryIntegrationInput `json:"awsAutoDiscovery,omitempty"`
// Billing integration
Billing []CloudBillingIntegrationInput `json:"billing,omitempty"`
// CloudFront integration
Expand Down Expand Up @@ -1547,6 +1551,44 @@ type CloudAwsXrayIntegrationInput struct {
MetricsPollingInterval int `json:"metricsPollingInterval,omitempty"`
}

// CloudAwsAutoDiscoveryIntegration - Aws Auto Discovery Integration
type CloudAwsAutoDiscoveryIntegration struct {
// Specify each AWS region that includes the resources that you want to monitor.
AwsRegions []string `json:"awsRegions,omitempty"`
// The object creation date, in epoch (Unix) time
CreatedAt nrtime.EpochSeconds `json:"createdAt"`
// The cloud service integration identifier.
ID int `json:"id,omitempty"`
// [DEPRECATED] Multiple polling interval is no longer supported, use only metrics_polling_interval
InventoryPollingInterval int `json:"inventoryPollingInterval,omitempty"`
// The parent linked account identifier.
LinkedAccount CloudLinkedAccount `json:"linkedAccount,omitempty"`
// The data polling interval in seconds.
MetricsPollingInterval int `json:"metricsPollingInterval,omitempty"`
// The cloud service integration name.
Name string `json:"name,omitempty"`
// The parent NewRelic account identifier.
NrAccountId int `json:"nrAccountId"`
// The cloud service used in the integration.
Service CloudService `json:"service,omitempty"`
// The object last update date, in epoch (Unix) time
UpdatedAt nrtime.EpochSeconds `json:"updatedAt"`
}

func (x *CloudAwsAutoDiscoveryIntegration) ImplementsCloudIntegration() {}

// CloudAwsAutoDiscoveryIntegrationInput - AWS Auto Discovery Integration
type CloudAwsAutoDiscoveryIntegrationInput struct {
// Specify each AWS region that includes the resources that you want to monitor.
AwsRegions []string `json:"awsRegions,omitempty"`
// [DEPRECATED] Multiple polling interval is no longer supported, use only metrics_polling_interval
InventoryPollingInterval int `json:"inventoryPollingInterval,omitempty"`
// The linked account identifier.
LinkedAccountId int `json:"linkedAccountId"`
// The data polling interval in seconds.
MetricsPollingInterval int `json:"metricsPollingInterval,omitempty"`
}

// CloudAzureAPImanagementIntegration - Api Management Integration
type CloudAzureAPImanagementIntegration struct {
// The object creation date, in epoch (Unix) time
Expand Down Expand Up @@ -6254,6 +6296,14 @@ func UnmarshalCloudIntegrationInterface(b []byte) (*CloudIntegrationInterface, e

var xxx CloudIntegrationInterface = &interfaceType

return &xxx, nil
case "CloudAwsAutoDiscoveryIntegration":
var interfaceType CloudAwsAutoDiscoveryIntegration
err = json.Unmarshal(b, &interfaceType)
if err != nil {
return nil, err
}
var xxx CloudIntegrationInterface = &interfaceType
return &xxx, nil
case "CloudAzureApimanagementIntegration":
var interfaceType CloudAzureAPImanagementIntegration
Expand Down
12 changes: 12 additions & 0 deletions pkg/entities/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
USER: "USER",
}

// AgentApplicationSettingsBrowserLoader - Determines which browser loader will be configured. Some allowed return values are specified for backwards-compatability and do not represent currently allowed values for new applications.

Check failure on line 31 in pkg/entities/types.go

View workflow job for this annotation

GitHub Actions / lint

"compatability" is a misspelling of "compatibility"

Check failure on line 31 in pkg/entities/types.go

View workflow job for this annotation

GitHub Actions / lint

"compatability" is a misspelling of "compatibility"
// See [documentation](https://docs.newrelic.com/docs/browser/browser-monitoring/installation/install-browser-monitoring-agent/#agent-types) for further information.
type AgentApplicationSettingsBrowserLoader string

Expand Down Expand Up @@ -60,7 +60,7 @@
RUM: "RUM",
// Pro+SPA: This is the default installed agent when you enable browser monitoring. Gives you access to all of the Browser Pro features and to Single Page App (SPA) monitoring. Provides detailed page timing data and the most up-to-date New Relic features, including distributed tracing, for all types of applications.
SPA: "SPA",
// This value is specified for backwards-compatability.

Check failure on line 63 in pkg/entities/types.go

View workflow job for this annotation

GitHub Actions / lint

"compatability" is a misspelling of "compatibility"

Check failure on line 63 in pkg/entities/types.go

View workflow job for this annotation

GitHub Actions / lint

"compatability" is a misspelling of "compatibility"
XHR: "XHR",
}

Expand Down Expand Up @@ -245,6 +245,8 @@
SLACK_LEGACY AiNotificationsChannelType
// Webhook channel type
WEBHOOK AiNotificationsChannelType
// Workflow Automation channel type
WORKFLOW_AUTOMATION AiNotificationsChannelType
}{
// Email channel type
EMAIL: "EMAIL",
Expand Down Expand Up @@ -276,6 +278,8 @@
SLACK_LEGACY: "SLACK_LEGACY",
// Webhook channel type
WEBHOOK: "WEBHOOK",
// Workflow Automation channel type
WORKFLOW_AUTOMATION: "WORKFLOW_AUTOMATION",
}

// AiNotificationsDestinationStatus - Destination statuses
Expand Down Expand Up @@ -379,6 +383,8 @@
SLACK_LEGACY AiNotificationsDestinationType
// WebHook destination type
WEBHOOK AiNotificationsDestinationType
// Workflow Automation destination type
WORKFLOW_AUTOMATION AiNotificationsDestinationType
}{
// Email destination type
EMAIL: "EMAIL",
Expand Down Expand Up @@ -406,6 +412,8 @@
SLACK_LEGACY: "SLACK_LEGACY",
// WebHook destination type
WEBHOOK: "WEBHOOK",
// Workflow Automation destination type
WORKFLOW_AUTOMATION: "WORKFLOW_AUTOMATION",
}

// AiNotificationsProduct - Product types
Expand Down Expand Up @@ -555,6 +563,8 @@
SLACK_LEGACY AiWorkflowsDestinationType
// Webhook Destination Configuration type
WEBHOOK AiWorkflowsDestinationType
// Workflow Automation Destination Configuration type
WORKFLOW_AUTOMATION AiWorkflowsDestinationType
}{
// Email Destination Configuration type
EMAIL: "EMAIL",
Expand Down Expand Up @@ -582,6 +592,8 @@
SLACK_LEGACY: "SLACK_LEGACY",
// Webhook Destination Configuration type
WEBHOOK: "WEBHOOK",
// Workflow Automation Destination Configuration type
WORKFLOW_AUTOMATION: "WORKFLOW_AUTOMATION",
}

// AiWorkflowsEnrichmentType - Type of Enrichment
Expand Down Expand Up @@ -792,7 +804,7 @@
WARNING: "WARNING",
}

// DashboardEntityPermissions - Permisions that represent visibility & editability

Check failure on line 807 in pkg/entities/types.go

View workflow job for this annotation

GitHub Actions / lint

"Permisions" is a misspelling of "Permission"

Check failure on line 807 in pkg/entities/types.go

View workflow job for this annotation

GitHub Actions / lint

"Permisions" is a misspelling of "Permission"
type DashboardEntityPermissions string

var DashboardEntityPermissionsTypes = struct {
Expand Down
8 changes: 8 additions & 0 deletions pkg/notifications/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ var AiNotificationsChannelTypeTypes = struct {
SLACK_LEGACY AiNotificationsChannelType
// Webhook channel type
WEBHOOK AiNotificationsChannelType
// Workflow Automation channel type
WORKFLOW_AUTOMATION AiNotificationsChannelType
}{
// Email channel type
EMAIL: "EMAIL",
Expand Down Expand Up @@ -183,6 +185,8 @@ var AiNotificationsChannelTypeTypes = struct {
SLACK_LEGACY: "SLACK_LEGACY",
// Webhook channel type
WEBHOOK: "WEBHOOK",
// Workflow Automation channel type
WORKFLOW_AUTOMATION: "WORKFLOW_AUTOMATION",
}

// AiNotificationsDestinationFields - Destination fields
Expand Down Expand Up @@ -329,6 +333,8 @@ var AiNotificationsDestinationTypeTypes = struct {
SLACK_LEGACY AiNotificationsDestinationType
// WebHook destination type
WEBHOOK AiNotificationsDestinationType
// Workflow Automation destination type
WORKFLOW_AUTOMATION AiNotificationsDestinationType
}{
// Email destination type
EMAIL: "EMAIL",
Expand Down Expand Up @@ -356,6 +362,8 @@ var AiNotificationsDestinationTypeTypes = struct {
SLACK_LEGACY: "SLACK_LEGACY",
// WebHook destination type
WEBHOOK: "WEBHOOK",
// Workflow Automation destination type
WORKFLOW_AUTOMATION: "WORKFLOW_AUTOMATION",
}

// AiNotificationsErrorType - Error types
Expand Down
4 changes: 4 additions & 0 deletions pkg/workflows/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ var AiWorkflowsDestinationTypeTypes = struct {
SLACK_LEGACY AiWorkflowsDestinationType
// Webhook Destination Configuration type
WEBHOOK AiWorkflowsDestinationType
// Workflow Automation Destination Configuration type
WORKFLOW_AUTOMATION AiWorkflowsDestinationType
}{
// Email Destination Configuration type
EMAIL: "EMAIL",
Expand Down Expand Up @@ -124,6 +126,8 @@ var AiWorkflowsDestinationTypeTypes = struct {
SLACK_LEGACY: "SLACK_LEGACY",
// Webhook Destination Configuration type
WEBHOOK: "WEBHOOK",
// Workflow Automation Destination Configuration type
WORKFLOW_AUTOMATION: "WORKFLOW_AUTOMATION",
}

// AiWorkflowsEnrichmentType - Type of Enrichment
Expand Down
Loading