Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
51dd823
update test for target_format
vinckama Sep 30, 2020
c50d740
Merge branch 'master' into datadog-api-spec/test/vincent.roy/logs_pip…
api-clients-generation-pipeline[bot] Sep 30, 2020
9576c2d
Merge branch 'master' into datadog-api-spec/test/vincent.roy/logs_pip…
api-clients-generation-pipeline[bot] Sep 30, 2020
2c6babe
Merge branch 'master' into datadog-api-spec/test/vincent.roy/logs_pip…
api-clients-generation-pipeline[bot] Sep 30, 2020
a748641
Merge branch 'master' into datadog-api-spec/test/vincent.roy/logs_pip…
api-clients-generation-pipeline[bot] Sep 30, 2020
8b2428c
Merge branch 'master' into datadog-api-spec/test/vincent.roy/logs_pip…
api-clients-generation-pipeline[bot] Sep 30, 2020
4cda33e
re-record
jirikuncar Sep 30, 2020
4a08715
Merge branch 'master' into datadog-api-spec/test/vincent.roy/logs_pip…
api-clients-generation-pipeline[bot] Sep 30, 2020
2cb628b
Merge branch 'master' into datadog-api-spec/test/vincent.roy/logs_pip…
api-clients-generation-pipeline[bot] Sep 30, 2020
88568df
Merge branch 'master' into datadog-api-spec/test/vincent.roy/logs_pip…
api-clients-generation-pipeline[bot] Oct 1, 2020
d54186b
Merge branch 'master' into datadog-api-spec/test/vincent.roy/logs_pip…
api-clients-generation-pipeline[bot] Oct 1, 2020
a1970bc
Merge branch 'master' into datadog-api-spec/test/vincent.roy/logs_pip…
api-clients-generation-pipeline[bot] Oct 1, 2020
845ee70
Merge branch 'master' into datadog-api-spec/test/vincent.roy/logs_pip…
api-clients-generation-pipeline[bot] Oct 2, 2020
2a7d741
Regenerate client from commit 77e1e09 of spec repo
Oct 2, 2020
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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.2.0",
"regenerated": "2020-10-01 16:43:50.219051",
"spec_repo_commit": "de74943"
"regenerated": "2020-10-02 08:27:57.372637",
"spec_repo_commit": "77e1e09"
},
"v2": {
"apigentools_version": "1.2.0",
"regenerated": "2020-10-01 16:43:56.002023",
"spec_repo_commit": "de74943"
"regenerated": "2020-10-02 08:28:03.467301",
"spec_repo_commit": "77e1e09"
}
}
}
2 changes: 2 additions & 0 deletions api/v1/datadog/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ docs/TableWidgetDefinitionType.md
docs/TableWidgetRequest.md
docs/TagToHosts.md
docs/TagsApi.md
docs/TargetFormatType.md
docs/TimeseriesWidgetDefinition.md
docs/TimeseriesWidgetDefinitionType.md
docs/TimeseriesWidgetRequest.md
Expand Down Expand Up @@ -773,6 +774,7 @@ model_table_widget_definition.go
model_table_widget_definition_type.go
model_table_widget_request.go
model_tag_to_hosts.go
model_target_format_type.go
model_timeseries_widget_definition.go
model_timeseries_widget_definition_type.go
model_timeseries_widget_request.go
Expand Down
1 change: 1 addition & 0 deletions api/v1/datadog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ Class | Method | HTTP request | Description
- [TableWidgetDefinitionType](docs/TableWidgetDefinitionType.md)
- [TableWidgetRequest](docs/TableWidgetRequest.md)
- [TagToHosts](docs/TagToHosts.md)
- [TargetFormatType](docs/TargetFormatType.md)
- [TimeseriesWidgetDefinition](docs/TimeseriesWidgetDefinition.md)
- [TimeseriesWidgetDefinitionType](docs/TimeseriesWidgetDefinitionType.md)
- [TimeseriesWidgetRequest](docs/TimeseriesWidgetRequest.md)
Expand Down
18 changes: 18 additions & 0 deletions api/v1/datadog/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9457,6 +9457,8 @@ components:
description: Final attribute or tag name to remap the sources to.
example: operation_id
type: string
target_format:
$ref: '#/components/schemas/TargetFormatType'
target_type:
default: attribute
description: Defines if the final attribute or tag name is from log `attribute`
Expand Down Expand Up @@ -14938,6 +14940,22 @@ components:
description: A list of tags to apply to the host.
type: object
type: object
TargetFormatType:
default: auto
description: |-
If the target of the remapper is an attribute, try to cast the value to a new specific type.
If the cast is not possible, the original type is kept. `string`, `integer`, or `double` are the possible types.
enum:
- auto
- string
- integer
- double
type: string
x-enum-varnames:
- AUTO
- STRING
- INTEGER
- DOUBLE
TimeseriesWidgetDefinition:
description: The timeseries visualization allows you to display the evolution
of one or more metrics, log events, or Analyzed Spans over time.
Expand Down
26 changes: 26 additions & 0 deletions api/v1/datadog/docs/LogsAttributeRemapper.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Name | Type | Description | Notes
**SourceType** | Pointer to **string** | Defines if the sources are from log `attribute` or `tag`. | [optional] [default to "attribute"]
**Sources** | **[]string** | Array of source attributes. |
**Target** | **string** | Final attribute or tag name to remap the sources to. |
**TargetFormat** | Pointer to [**TargetFormatType**](TargetFormatType.md) | | [optional] [default to "auto"]
**TargetType** | Pointer to **string** | Defines if the final attribute or tag name is from log `attribute` or `tag`. | [optional] [default to "attribute"]
**Type** | [**LogsAttributeRemapperType**](LogsAttributeRemapperType.md) | | [default to "attribute-remapper"]

Expand Down Expand Up @@ -198,6 +199,31 @@ and a boolean to check if the value has been set.
SetTarget sets Target field to given value.


### GetTargetFormat

`func (o *LogsAttributeRemapper) GetTargetFormat() TargetFormatType`

GetTargetFormat returns the TargetFormat field if non-nil, zero value otherwise.

### GetTargetFormatOk

`func (o *LogsAttributeRemapper) GetTargetFormatOk() (*TargetFormatType, bool)`

GetTargetFormatOk returns a tuple with the TargetFormat field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetTargetFormat

`func (o *LogsAttributeRemapper) SetTargetFormat(v TargetFormatType)`

SetTargetFormat sets TargetFormat field to given value.

### HasTargetFormat

`func (o *LogsAttributeRemapper) HasTargetFormat() bool`

HasTargetFormat returns a boolean if a field has been set.

### GetTargetType

`func (o *LogsAttributeRemapper) GetTargetType() string`
Expand Down
2 changes: 1 addition & 1 deletion api/v1/datadog/docs/LogsPipelinesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func main() {
},
)

body := datadog.LogsPipeline{Filter: datadog.LogsFilter{Query: "Query_example"}, Id: "Id_example", IsEnabled: false, IsReadOnly: false, Name: "Name_example", Processors: []LogsProcessor{datadog.LogsProcessor{Grok: datadog.LogsGrokParserRules{MatchRules: "MatchRules_example", SupportRules: "SupportRules_example"}, IsEnabled: false, Name: "Name_example", Samples: []string{"Samples_example"), Source: "Source_example", Type: datadog.LogsTraceRemapperType{}, Sources: []string{"Sources_example"), OverrideOnConflict: false, PreserveSource: false, SourceType: "SourceType_example", Target: "Target_example", TargetType: "TargetType_example", NormalizeEndingSlashes: false, IsEncoded: false, Categories: []LogsCategoryProcessorCategories{datadog.LogsCategoryProcessor_categories{Filter: datadog.LogsFilter{Query: "Query_example"}, Name: "Name_example"}), Expression: "Expression_example", IsReplaceMissing: false, Template: "Template_example", Filter: , Processors: []LogsProcessor{datadog.LogsProcessor{Grok: datadog.LogsGrokParserRules{MatchRules: "MatchRules_example", SupportRules: "SupportRules_example"}, IsEnabled: false, Name: "Name_example", Samples: []string{"Samples_example"), Source: "Source_example", Type: datadog.LogsTraceRemapperType{}, Sources: []string{"Sources_example"), OverrideOnConflict: false, PreserveSource: false, SourceType: "SourceType_example", Target: "Target_example", TargetType: "TargetType_example", NormalizeEndingSlashes: false, IsEncoded: false, Categories: []LogsCategoryProcessorCategories{datadog.LogsCategoryProcessor_categories{Filter: , Name: "Name_example"}), Expression: "Expression_example", IsReplaceMissing: false, Template: "Template_example", Filter: , Processors: []LogsProcessor{), DefaultLookup: "DefaultLookup_example", LookupTable: []string{"LookupTable_example")}), DefaultLookup: "DefaultLookup_example", LookupTable: []string{"LookupTable_example")}), Type: "Type_example"} // LogsPipeline | Definition of the new pipeline.
body := datadog.LogsPipeline{Filter: datadog.LogsFilter{Query: "Query_example"}, Id: "Id_example", IsEnabled: false, IsReadOnly: false, Name: "Name_example", Processors: []LogsProcessor{datadog.LogsProcessor{Grok: datadog.LogsGrokParserRules{MatchRules: "MatchRules_example", SupportRules: "SupportRules_example"}, IsEnabled: false, Name: "Name_example", Samples: []string{"Samples_example"), Source: "Source_example", Type: datadog.LogsTraceRemapperType{}, Sources: []string{"Sources_example"), OverrideOnConflict: false, PreserveSource: false, SourceType: "SourceType_example", Target: "Target_example", TargetFormat: datadog.TargetFormatType{}, TargetType: "TargetType_example", NormalizeEndingSlashes: false, IsEncoded: false, Categories: []LogsCategoryProcessorCategories{datadog.LogsCategoryProcessor_categories{Filter: datadog.LogsFilter{Query: "Query_example"}, Name: "Name_example"}), Expression: "Expression_example", IsReplaceMissing: false, Template: "Template_example", Filter: , Processors: []LogsProcessor{datadog.LogsProcessor{Grok: datadog.LogsGrokParserRules{MatchRules: "MatchRules_example", SupportRules: "SupportRules_example"}, IsEnabled: false, Name: "Name_example", Samples: []string{"Samples_example"), Source: "Source_example", Type: datadog.LogsTraceRemapperType{}, Sources: []string{"Sources_example"), OverrideOnConflict: false, PreserveSource: false, SourceType: "SourceType_example", Target: "Target_example", TargetFormat: datadog.TargetFormatType{}, TargetType: "TargetType_example", NormalizeEndingSlashes: false, IsEncoded: false, Categories: []LogsCategoryProcessorCategories{datadog.LogsCategoryProcessor_categories{Filter: , Name: "Name_example"}), Expression: "Expression_example", IsReplaceMissing: false, Template: "Template_example", Filter: , Processors: []LogsProcessor{), DefaultLookup: "DefaultLookup_example", LookupTable: []string{"LookupTable_example")}), DefaultLookup: "DefaultLookup_example", LookupTable: []string{"LookupTable_example")}), Type: "Type_example"} // LogsPipeline | Definition of the new pipeline.

configuration := datadog.NewConfiguration()
api_client := datadog.NewAPIClient(configuration)
Expand Down
26 changes: 26 additions & 0 deletions api/v1/datadog/docs/LogsProcessor.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Name | Type | Description | Notes
**PreserveSource** | Pointer to **bool** | Remove or preserve the remapped source element. | [optional] [default to false]
**SourceType** | Pointer to **string** | Defines if the sources are from log `attribute` or `tag`. | [optional] [default to "attribute"]
**Target** | **string** | Name of the attribute that contains the corresponding value in the mapping list or the `default_lookup` if not found in the mapping list. |
**TargetFormat** | Pointer to [**TargetFormatType**](TargetFormatType.md) | | [optional] [default to "auto"]
**TargetType** | Pointer to **string** | Defines if the final attribute or tag name is from log `attribute` or `tag`. | [optional] [default to "attribute"]
**NormalizeEndingSlashes** | Pointer to **NullableBool** | Normalize the ending slashes or not. | [optional] [default to false]
**IsEncoded** | Pointer to **bool** | Define if the source attribute is URL encoded or not. | [optional] [default to false]
Expand Down Expand Up @@ -296,6 +297,31 @@ and a boolean to check if the value has been set.
SetTarget sets Target field to given value.


### GetTargetFormat

`func (o *LogsProcessor) GetTargetFormat() TargetFormatType`

GetTargetFormat returns the TargetFormat field if non-nil, zero value otherwise.

### GetTargetFormatOk

`func (o *LogsProcessor) GetTargetFormatOk() (*TargetFormatType, bool)`

GetTargetFormatOk returns a tuple with the TargetFormat field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetTargetFormat

`func (o *LogsProcessor) SetTargetFormat(v TargetFormatType)`

SetTargetFormat sets TargetFormat field to given value.

### HasTargetFormat

`func (o *LogsProcessor) HasTargetFormat() bool`

HasTargetFormat returns a boolean if a field has been set.

### GetTargetType

`func (o *LogsProcessor) GetTargetType() string`
Expand Down
11 changes: 11 additions & 0 deletions api/v1/datadog/docs/TargetFormatType.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# TargetFormatType

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------


[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


42 changes: 41 additions & 1 deletion api/v1/datadog/model_logs_attribute_remapper.go

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

83 changes: 83 additions & 0 deletions api/v1/datadog/model_target_format_type.go

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

3 changes: 2 additions & 1 deletion tests/api/v1/datadog/api_logs_pipelines_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ func TestLogsPipelinesLifecycle(t *testing.T) {
remapper.SetSources([]string{"source"})
remapper.SetSourceType("tag")
remapper.SetTarget("target")
remapper.SetTargetType("tag")
remapper.SetTargetType("attribute")
remapper.SetPreserveSource(true)
remapper.SetOverrideOnConflict(true)
remapper.SetName("log message remapper")
remapper.SetTargetFormat(datadog.TARGETFORMATTYPE_STRING)

urlParser := datadog.NewLogsURLParserWithDefaults()
urlParser.SetSources([]string{"source"})
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2020-05-12T15:31:46.329189+02:00
2020-09-30T15:42:35.50010402Z
Loading