Skip to content

aws.codeguruprofiler.get_recommendations

Example SQL Queries

SELECT * FROM
aws.codeguruprofiler.get_recommendations
WHERE
"end_time" = 'VALUE'
AND "profiling_group_name" = 'VALUE'
AND "start_time" = 'VALUE';

Description

Returns a list of Recommendation objects that contain recommendations for a profiling group for a given time period. A list of Anomaly objects that contains details about anomalies detected in the profiling group for the same time period is also returned.

Table Definition

Column NameColumn Data Type
end_time Required Input Column

The start time of the profile to get analysis data about. You must specify startTime and endTime. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

TIMESTAMP_S
profiling_group_name Required Input Column

The name of the profiling group the analysis data is about.

VARCHAR
start_time Required Input Column

The end time of the profile to get analysis data about. You must specify startTime and endTime. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

TIMESTAMP_S
locale Input Column

The language used to provide analysis. Specify using a string that is one of the following BCP 47 language codes.

  • de-DE - German, Germany

  • en-GB - English, United Kingdom

  • en-US - English, United States

  • es-ES - Spanish, Spain

  • fr-FR - French, France

  • it-IT - Italian, Italy

  • ja-JP - Japanese, Japan

  • ko-KR - Korean, Republic of Korea

  • pt-BR - Portugese, Brazil

  • zh-CN - Chinese, China

  • zh-TW - Chinese, Taiwan

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

anomalies

The list of anomalies that the analysis has found for this profile.

STRUCT(
"instances" STRUCT(
"end_time" TIMESTAMP_S,
"id" VARCHAR,
"start_time" TIMESTAMP_S,
"user_feedback" STRUCT(
"type" VARCHAR
)
)[],
"metric" STRUCT(
"frame_name" VARCHAR,
"thread_states" VARCHAR[],
"type" VARCHAR
),
"reason" VARCHAR
)[]
Show child fields
anomalies[]
Show child fields
anomalies[].instances[]
Show child fields
anomalies[].instances[].end_time

The end time of the period during which the metric is flagged as anomalous. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

anomalies[].instances[].id

The universally unique identifier (UUID) of an instance of an anomaly in a metric.

anomalies[].instances[].start_time

The start time of the period during which the metric is flagged as anomalous. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

anomalies[].instances[].user_feedback

Feedback type on a specific instance of anomaly submitted by the user.

Show child fields
anomalies[].instances[].user_feedback.type

Optional Positive or Negative feedback submitted by the user about whether the recommendation is useful or not.

anomalies[].metric

Details about the metric that the analysis used when it detected the anomaly. The metric includes the name of the frame that was analyzed with the type and thread states used to derive the metric value for that frame.

Show child fields
anomalies[].metric.frame_name

The name of the method that appears as a frame in any stack in a profile.

anomalies[].metric.thread_states[]
anomalies[].metric.type

A type that specifies how a metric for a frame is analyzed. The supported value AggregatedRelativeTotalTime is an aggregation of the metric value for one frame that is calculated across the occurences of all frames in a profile.

anomalies[].reason

The reason for which metric was flagged as anomalous.

profile_end_time

The end time of the profile the analysis data is about. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

TIMESTAMP_S
profile_start_time

The start time of the profile the analysis data is about. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

TIMESTAMP_S
recommendations

The list of recommendations that the analysis found for this profile.

STRUCT(
"all_matches_count" BIGINT,
"all_matches_sum" DOUBLE,
"end_time" TIMESTAMP_S,
"pattern" STRUCT(
"counters_to_aggregate" VARCHAR[],
"description" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"resolution_steps" VARCHAR,
"target_frames" VARCHAR[][],
"threshold_percent" DOUBLE
),
"start_time" TIMESTAMP_S,
"top_matches" STRUCT(
"frame_address" VARCHAR,
"target_frames_index" BIGINT,
"threshold_breach_value" DOUBLE
)[]
)[]
Show child fields
recommendations[]
Show child fields
recommendations[].all_matches_count

How many different places in the profile graph triggered a match.

recommendations[].all_matches_sum

How much of the total sample count is potentially affected.

recommendations[].end_time

End time of the profile that was used by this analysis. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

recommendations[].pattern

The pattern that analysis recognized in the profile to make this recommendation.

Show child fields
recommendations[].pattern.counters_to_aggregate[]
recommendations[].pattern.description

The description of the recommendation. This explains a potential inefficiency in a profiled application.

recommendations[].pattern.id

The universally unique identifier (UUID) of this pattern.

recommendations[].pattern.name

The name for this pattern.

recommendations[].pattern.resolution_steps

A string that contains the steps recommended to address the potential inefficiency.

recommendations[].pattern.target_frames[][]
recommendations[].pattern.threshold_percent

The percentage of time an application spends in one method that triggers a recommendation. The percentage of time is the same as the percentage of the total gathered sample counts during analysis.

recommendations[].start_time

The start time of the profile that was used by this analysis. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.

recommendations[].top_matches[]
Show child fields
recommendations[].top_matches[].frame_address

The location in the profiling graph that contains a recommendation found during analysis.

recommendations[].top_matches[].target_frames_index

The target frame that triggered a match.

recommendations[].top_matches[].threshold_breach_value

The value in the profile data that exceeded the recommendation threshold.