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
27 changes: 24 additions & 3 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25417,7 +25417,14 @@ components:
format: int64
type: integer
feature_flags_config_requests_sum:
description: Shows the sum of all Feature Flags Client-Side SDK config requests over all hours in the current date for all organizations.
description: |-
Shows the sum of all Feature Flags configuration-request usage units from client-side and server-side SDK
requests over all hours in the current date for all organizations. Each metered client-side request
contributes 1 unit, and each metered server-side request contributes 10 units. This value already includes
the server-side multiplier, so do not multiply it again. For example, 100 metered client-side requests and
10 metered server-side requests total 200 units, not 110. Periods before server-side metering began include
no server-side requests.
See [Monthly Flag Configuration Requests](https://docs.datadoghq.com/feature_flags/concepts/monthly_flag_configuration_requests/).
format: int64
type: integer
flex_logs_compute_large_avg:
Expand Down Expand Up @@ -26658,7 +26665,14 @@ components:
format: int64
type: integer
feature_flags_config_requests_sum:
description: Shows the sum of all Feature Flags Client-Side SDK config requests over all hours in the current date for the given org.
description: |-
Shows the sum of all Feature Flags configuration-request usage units from client-side and server-side SDK
requests over all hours in the current date for the given org. Each metered client-side request contributes
1 unit, and each metered server-side request contributes 10 units. This value already includes the
server-side multiplier, so do not multiply it again. For example, 100 metered client-side requests and 10
metered server-side requests total 200 units, not 110. Periods before server-side metering began include no
server-side requests.
See [Monthly Flag Configuration Requests](https://docs.datadoghq.com/feature_flags/concepts/monthly_flag_configuration_requests/).
format: int64
type: integer
flex_logs_compute_large_avg:
Expand Down Expand Up @@ -27910,7 +27924,14 @@ components:
format: int64
type: integer
feature_flags_config_requests_agg_sum:
description: Shows the sum of all Feature Flags Client-Side SDK config requests over all hours in the current month for all organizations.
description: |-
Shows the sum of all Feature Flags configuration-request usage units from client-side and server-side SDK
requests over all hours in the current month for all organizations. Each metered client-side request
contributes 1 unit, and each metered server-side request contributes 10 units. This value already includes
the server-side multiplier, so do not multiply it again. For example, 100 metered client-side requests and
10 metered server-side requests total 200 units, not 110. Periods before server-side metering began include
no server-side requests.
See [Monthly Flag Configuration Requests](https://docs.datadoghq.com/feature_flags/concepts/monthly_flag_configuration_requests/).
format: int64
type: integer
flex_logs_compute_large_avg_sum:
Expand Down
129 changes: 78 additions & 51 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions examples/v2/tag-rules/CreateTagRule.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ public static void main(String[] args) {
.negated(false)
.required(true)
.ruleType(TagRuleCreateType.SURFACING)
.scope("env")
.scope("env:prod")
.source(TagRuleSource.LOGS)
.tagKey("service")
.tagValuePatterns(Arrays.asList("api", "web")))
.type(TagRuleResourceType.TAG_RULE));
.type(TagRuleResourceType.TAG_POLICY));

try {
TagRuleResponse result = apiInstance.createTagRule(body);
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/tag-rules/UpdateTagRule.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static void main(String[] args) {
new TagRuleUpdateData()
.attributes(new TagRuleUpdateAttributes().ruleType(TagRuleType.SURFACING))
.id("123")
.type(TagRuleResourceType.TAG_RULE));
.type(TagRuleResourceType.TAG_POLICY));

try {
TagRuleResponse result = apiInstance.updateTagRule("123", body);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4409,8 +4409,14 @@ public UsageSummaryDate featureFlagsConfigRequestsSum(Long featureFlagsConfigReq
}

/**
* Shows the sum of all Feature Flags Client-Side SDK config requests over all hours in the
* current date for all organizations.
* Shows the sum of all Feature Flags configuration-request usage units from client-side and
* server-side SDK requests over all hours in the current date for all organizations. Each metered
* client-side request contributes 1 unit, and each metered server-side request contributes 10
* units. This value already includes the server-side multiplier, so do not multiply it again. For
* example, 100 metered client-side requests and 10 metered server-side requests total 200 units,
* not 110. Periods before server-side metering began include no server-side requests. See <a
* href="https://docs.datadoghq.com/feature_flags/concepts/monthly_flag_configuration_requests/">Monthly
* Flag Configuration Requests</a>.
*
* @return featureFlagsConfigRequestsSum
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4498,8 +4498,14 @@ public UsageSummaryDateOrg featureFlagsConfigRequestsSum(Long featureFlagsConfig
}

/**
* Shows the sum of all Feature Flags Client-Side SDK config requests over all hours in the
* current date for the given org.
* Shows the sum of all Feature Flags configuration-request usage units from client-side and
* server-side SDK requests over all hours in the current date for the given org. Each metered
* client-side request contributes 1 unit, and each metered server-side request contributes 10
* units. This value already includes the server-side multiplier, so do not multiply it again. For
* example, 100 metered client-side requests and 10 metered server-side requests total 200 units,
* not 110. Periods before server-side metering began include no server-side requests. See <a
* href="https://docs.datadoghq.com/feature_flags/concepts/monthly_flag_configuration_requests/">Monthly
* Flag Configuration Requests</a>.
*
* @return featureFlagsConfigRequestsSum
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4634,8 +4634,15 @@ public UsageSummaryResponse featureFlagsConfigRequestsAggSum(
}

/**
* Shows the sum of all Feature Flags Client-Side SDK config requests over all hours in the
* current month for all organizations.
* Shows the sum of all Feature Flags configuration-request usage units from client-side and
* server-side SDK requests over all hours in the current month for all organizations. Each
* metered client-side request contributes 1 unit, and each metered server-side request
* contributes 10 units. This value already includes the server-side multiplier, so do not
* multiply it again. For example, 100 metered client-side requests and 10 metered server-side
* requests total 200 units, not 110. Periods before server-side metering began include no
* server-side requests. See <a
* href="https://docs.datadoghq.com/feature_flags/concepts/monthly_flag_configuration_requests/">Monthly
* Flag Configuration Requests</a>.
*
* @return featureFlagsConfigRequestsAggSum
*/
Expand Down
21 changes: 15 additions & 6 deletions src/main/java/com/datadog/api/client/v2/api/TagRulesApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ public CompletableFuture<Void> deleteTagRuleAsync(
/**
* Delete a tag rule. By default the rule is soft-deleted so it can be recovered later and so that
* historical score data remains queryable. Pass <code>hard_delete=true</code> to remove the rule
* permanently.
* permanently. Deleting a <code>blocking</code> rule additionally requires the <code>
* telemetry_rules_activate</code> permission.
*
* @param ruleId The unique identifier of the tag rule to delete. (required)
* @param parameters Optional parameters for the request.
Expand Down Expand Up @@ -438,7 +439,9 @@ public GetTagRuleOptionalParameters include(TagRuleInclude include) {
* Set tsStart.
*
* @param tsStart Start of the time window used for compliance score computation, as a Unix
* timestamp in milliseconds. (optional)
* timestamp in milliseconds. Defaults to approximately 4 hours before the current time for
* metrics, or 24 hours before the current time for other sources. The API clamps earlier
* values to this default, regardless of <code>ts_end</code>. (optional)
* @return GetTagRuleOptionalParameters
*/
public GetTagRuleOptionalParameters tsStart(Long tsStart) {
Expand Down Expand Up @@ -675,7 +678,9 @@ public static class GetTagRuleScoreOptionalParameters {
* Set tsStart.
*
* @param tsStart Start of the time window used for compliance score computation, as a Unix
* timestamp in milliseconds. (optional)
* timestamp in milliseconds. Defaults to approximately 4 hours before the current time for
* metrics, or 24 hours before the current time for other sources. The API clamps earlier
* values to this default, regardless of <code>ts_end</code>. (optional)
* @return GetTagRuleScoreOptionalParameters
*/
public GetTagRuleScoreOptionalParameters tsStart(Long tsStart) {
Expand Down Expand Up @@ -962,8 +967,9 @@ public ListTagRulesOptionalParameters filterSource(TagRuleSource filterSource) {
* Set tsStart.
*
* @param tsStart Start of the time window used for compliance score computation, as a Unix
* timestamp in milliseconds. Defaults to a recent window appropriate for the source.
* (optional)
* timestamp in milliseconds. Defaults to approximately 4 hours before the current time for
* metrics, or 24 hours before the current time for other sources. The API clamps earlier
* values to this default, regardless of <code>ts_end</code>. (optional)
* @return ListTagRulesOptionalParameters
*/
public ListTagRulesOptionalParameters tsStart(Long tsStart) {
Expand Down Expand Up @@ -1214,7 +1220,10 @@ public CompletableFuture<TagRuleResponse> updateTagRuleAsync(
/**
* Update one or more attributes of an existing tag rule. Only the fields supplied in the request
* body are modified; omitted fields retain their current values. The rule's <code>source</code>
* cannot be changed after creation.
* cannot be changed after creation. Promoting a rule from <code>surfacing</code> to <code>
* blocking</code> additionally requires the <code>telemetry_rules_activate</code> permission, and
* your organization must have access to blocking rules. You can't promote RUM rules to <code>
* blocking</code>.
*
* @param ruleId The unique identifier of the tag rule to update. (required)
* @param body (required)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,8 @@ public TagRuleAttributes ruleType(TagRuleType ruleType) {

/**
* How the rule is enforced. <code>blocking</code> rejects telemetry that violates the rule.
* <code>surfacing</code> only highlights non-compliant telemetry without blocking it.
* <code>surfacing</code> only highlights non-compliant telemetry without blocking it. RUM
* supports only <code>surfacing</code> rules.
*
* @return ruleType
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@
import java.util.Map;
import java.util.Objects;

/** Attributes that can be supplied when creating a tag rule. */
/**
* Attributes that can be supplied when creating a tag rule. If <code>tag_value_patterns</code>
* contains <code>*</code>, set <code>required</code> and <code>negated</code> to different values.
* If both are <code>false</code>, the rule has no effect. If both are <code>true</code>, no value
* can satisfy the rule.
*/
@JsonPropertyOrder({
TagRuleCreateAttributes.JSON_PROPERTY_ENABLED,
TagRuleCreateAttributes.JSON_PROPERTY_NAME,
Expand Down Expand Up @@ -89,7 +94,8 @@ public TagRuleCreateAttributes enabled(Boolean enabled) {
}

/**
* Whether the rule is currently enforced. Defaults to <code>true</code> for newly created rules.
* The API ignores this value on creation and always enables new rules. To disable a rule, use the
* "Update a tag rule" endpoint.
*
* @return enabled
*/
Expand Down Expand Up @@ -199,8 +205,10 @@ public TagRuleCreateAttributes scope(String scope) {
}

/**
* The scope the rule applies within. Typically an environment, team, or organization-level
* identifier used to limit where the rule is enforced.
* The scope the rule applies within. For logs and spans, use a search query, such as <code>
* env:prod</code>, or <code>*</code> to match all telemetry. For metrics, use a metric selector
* with an optional tag filter, such as <code>system.cpu.*{env:prod}</code>. A metric wildcard is
* allowed only once, at the end of the metric selector.
*
* @return scope
*/
Expand Down Expand Up @@ -244,7 +252,9 @@ public TagRuleCreateAttributes tagKey(String tagKey) {
}

/**
* The tag key that the rule governs (for example, <code>service</code>).
* The tag key that the rule governs (for example, <code>service</code>). Allowed characters are
* ASCII letters, digits, underscores, hyphens, periods, and slashes. The keys <code>host</code>
* and <code>device</code> are not supported in any letter case.
*
* @return tagKey
*/
Expand All @@ -269,8 +279,9 @@ public TagRuleCreateAttributes addTagValuePatternsItem(String tagValuePatternsIt
}

/**
* One or more patterns that valid values for the tag key must match. At least one pattern is
* required.
* Between 1 and 30 non-empty patterns that valid values for the tag key must match. Allowed
* characters are ASCII letters, digits, underscores, colons, hyphens, periods, commas, slashes,
* and asterisks.
*
* @return tagValuePatterns
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ public TagRuleCreateData attributes(TagRuleCreateAttributes attributes) {
}

/**
* Attributes that can be supplied when creating a tag rule.
* Attributes that can be supplied when creating a tag rule. If <code>tag_value_patterns</code>
* contains <code>*</code>, set <code>required</code> and <code>negated</code> to different
* values. If both are <code>false</code>, the rule has no effect. If both are <code>true</code>,
* no value can satisfy the rule.
*
* @return attributes
*/
Expand All @@ -76,7 +79,8 @@ public TagRuleCreateData type(TagRuleResourceType type) {
}

/**
* JSON:API resource type for a tag rule.
* JSON:API resource type for a tag rule. Requests accept <code>tag_rule</code> or <code>
* tag_policy</code>; responses use <code>tag_policy</code>.
*
* @return type
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ public TagRuleData type(TagRuleResourceType type) {
}

/**
* JSON:API resource type for a tag rule.
* JSON:API resource type for a tag rule. Requests accept <code>tag_rule</code> or <code>
* tag_policy</code>; responses use <code>tag_policy</code>.
*
* @return type
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,18 @@
import java.util.HashSet;
import java.util.Set;

/** JSON:API resource type for a tag rule. */
/**
* JSON:API resource type for a tag rule. Requests accept <code>tag_rule</code> or <code>tag_policy
* </code>; responses use <code>tag_policy</code>.
*/
@JsonSerialize(using = TagRuleResourceType.TagRuleResourceTypeSerializer.class)
public class TagRuleResourceType extends ModelEnum<String> {

private static final Set<String> allowedValues = new HashSet<String>(Arrays.asList("tag_rule"));
private static final Set<String> allowedValues =
new HashSet<String>(Arrays.asList("tag_rule", "tag_policy"));

public static final TagRuleResourceType TAG_RULE = new TagRuleResourceType("tag_rule");
public static final TagRuleResourceType TAG_POLICY = new TagRuleResourceType("tag_policy");

TagRuleResourceType(String value) {
super(value, allowedValues);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ public TagRuleScoreData type(TagRuleScoreResourceType type) {
}

/**
* JSON:API resource type for a tag rule compliance score.
* JSON:API resource type for a tag rule compliance score. Responses use <code>tag_policy_score
* </code>.
*
* @return type
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ public TagRuleScoreRelationshipData type(TagRuleScoreResourceType type) {
}

/**
* JSON:API resource type for a tag rule compliance score.
* JSON:API resource type for a tag rule compliance score. Responses use <code>tag_policy_score
* </code>.
*
* @return type
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,20 @@
import java.util.HashSet;
import java.util.Set;

/** JSON:API resource type for a tag rule compliance score. */
/**
* JSON:API resource type for a tag rule compliance score. Responses use <code>tag_policy_score
* </code>.
*/
@JsonSerialize(using = TagRuleScoreResourceType.TagRuleScoreResourceTypeSerializer.class)
public class TagRuleScoreResourceType extends ModelEnum<String> {

private static final Set<String> allowedValues =
new HashSet<String>(Arrays.asList("tag_rule_score"));
new HashSet<String>(Arrays.asList("tag_rule_score", "tag_policy_score"));

public static final TagRuleScoreResourceType TAG_RULE_SCORE =
new TagRuleScoreResourceType("tag_rule_score");
public static final TagRuleScoreResourceType TAG_POLICY_SCORE =
new TagRuleScoreResourceType("tag_policy_score");

TagRuleScoreResourceType(String value) {
super(value, allowedValues);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@

/**
* How the rule is enforced. <code>blocking</code> rejects telemetry that violates the rule. <code>
* surfacing</code> only highlights non-compliant telemetry without blocking it.
* surfacing</code> only highlights non-compliant telemetry without blocking it. RUM supports only
* <code>surfacing</code> rules.
*/
@JsonSerialize(using = TagRuleType.TagRuleTypeSerializer.class)
public class TagRuleType extends ModelEnum<String> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@

/**
* Mutable attributes of a tag rule. Each field is optional; omitting a field leaves its current
* value unchanged. The <code>source</code> of a rule cannot be changed.
* value unchanged. The <code>source</code> of a rule cannot be changed. Tag keys, patterns, and
* metrics scopes have the same constraints as on creation. If the effective <code>
* tag_value_patterns</code> contains <code>*</code>, set <code>required</code> and <code>negated
* </code> to different values.
*/
@JsonPropertyOrder({
TagRuleUpdateAttributes.JSON_PROPERTY_ENABLED,
Expand Down Expand Up @@ -153,7 +156,8 @@ public TagRuleUpdateAttributes ruleType(TagRuleType ruleType) {

/**
* How the rule is enforced. <code>blocking</code> rejects telemetry that violates the rule.
* <code>surfacing</code> only highlights non-compliant telemetry without blocking it.
* <code>surfacing</code> only highlights non-compliant telemetry without blocking it. RUM
* supports only <code>surfacing</code> rules.
*
* @return ruleType
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ public TagRuleUpdateData attributes(TagRuleUpdateAttributes attributes) {

/**
* Mutable attributes of a tag rule. Each field is optional; omitting a field leaves its current
* value unchanged. The <code>source</code> of a rule cannot be changed.
* value unchanged. The <code>source</code> of a rule cannot be changed. Tag keys, patterns, and
* metrics scopes have the same constraints as on creation. If the effective <code>
* tag_value_patterns</code> contains <code>*</code>, set <code>required</code> and <code>negated
* </code> to different values.
*
* @return attributes
*/
Expand Down Expand Up @@ -100,7 +103,8 @@ public TagRuleUpdateData type(TagRuleResourceType type) {
}

/**
* JSON:API resource type for a tag rule.
* JSON:API resource type for a tag rule. Requests accept <code>tag_rule</code> or <code>
* tag_policy</code>; responses use <code>tag_policy</code>.
*
* @return type
*/
Expand Down
Loading
Loading