getsentry / sentry-elixir

The official Elixir SDK for Sentry (sentry.io)
https://sentry.io
MIT License
623 stars 185 forks source link

Sentry client filters GraphQL query in body #225

Closed samsondav closed 6 years ago

samsondav commented 6 years ago

For debugging I'd like to see the full GraphQL query, but it's filtered like this:

Body

{operationName: None, query: [Filtered], variables: {id: 1730}}
mitchellhenke commented 6 years ago

@samphilipd thanks for opening this! I have a few questions.

Is this from a Sentry.Plug, Sentry.Logger, or a manually reported event?

By default, Sentry.Plug will scrub any keys with ["password", "passwd", "secret"], and replace it with "*********".

Is this an entry from the logs? I ask because it looks like it may be from Phoenix.Logger, which also scrubs parameters, but replaces it with "[FILTERED]".

If you could share some detail around your Sentry version and configuration as well, I'd be happy to take a further look!

samsondav commented 6 years ago

Sentry 6.0.2

This error was logged by Sentry.Plug.

This is not from the logs, it is from the Sentry panel:

screen shot 2017-10-30 at 15 47 54
mitchellhenke commented 6 years ago

It appears this may be a result of Sentry server functionality, with the potentially related issue being this one. I unfortunately don't think there's much we can do from within sentry-elixir.

samsondav commented 6 years ago

Hmm. Our URL does not contain an access_token param so this seems unrelated

mitchellhenke commented 6 years ago

Could you share a query that causes it to be filtered?

samsondav commented 6 years ago

It's a very large graphQL query. Endpint is /graphl with no query params. Body is huge... will it help for me to include it all here?

mitchellhenke commented 6 years ago

@samphilipd yep, it would be super helpful to have something I can test with and reproduce.

samsondav commented 6 years ago

Here is the body:

{"query":"query ($id: ID!) {\n  deal: nestDeal(id: $id) {\n    id\n    ...GeneralInfo\n    ...RelationshipManagerResponsibility\n    ...ValuationAnalystSection\n    ...AgencySection\n    ...QualificationSection\n    ...ProgressionSection\n    closeIoLeadId\n    __typename\n  }\n  inputOptions {\n    closeioLeadStatuses {\n      value\n      label\n      __typename\n    }\n    closeioOpportunityStatuses {\n      value\n      label\n      __typename\n    }\n    closeioUsers {\n      value\n      label\n      __typename\n    }\n    nestedEmployees {\n      value\n      label\n      __typename\n    }\n    reasonsForFallOut {\n      value\n      label\n      __typename\n    }\n    reasonsForNoGuaranteeOffered {\n      value\n      label\n      __typename\n    }\n    whyNestedOptions {\n      value\n      label\n      __typename\n    }\n    __typename\n  }\n}\n\nfragment GeneralInfo on NestDeal {\n  nestedQualifier\n  nestedValuer\n  nestedRelationshipManager\n  nestedVendorManager\n  name\n  secondOwnerName\n  closeIoLeadStatusId\n  closeIoOpportunityStatusId\n  guaranteeCurrentStatus\n  source\n  partnerReferral\n  partnerDetails\n  address\n  propertyType\n  propertySubType\n  floorPositionsOccupied\n  condition\n  tenure\n  leaseRemaining\n  isLeaseExtendable\n  groundRent\n  serviceCharge\n  beds\n  bathrooms\n  floorAreaUserSubmitted\n  floorAreaTotal\n  floorAreaHabitable\n  outsideSpace\n  outdoorSpaceArea\n  renovated\n  investment\n  obtainedPlanningPermission\n  renovationSummary\n  parkingAccess\n  occupancy\n  endOfTenancyUserSubmitted\n  tenancyEndDate\n  listedBuilding\n  conservationArea\n  propertyIssues\n  propertyIssuesDetails\n  aboveRetail\n  additionalDetails\n  __typename\n}\n\nfragment RelationshipManagerResponsibility on NestDeal {\n  nestedRelationshipManager\n  projectedNestedContractSignedDate\n  projectedEarlyPaymentDateFull\n  projectedEarlyPaymentDateTenPercent\n  actualNestedOfferRequestDate\n  actualNestedContractSignedDate\n  actualGuaranteeStartDate\n  actualGuaranteeEndDate\n  actualEarlyPaymentDateFull\n  actualEarlyPaymentDateTenPercent\n  actualPostNinetyDayPaymentDate\n  currentListingUrl\n  indicativeListingPrice\n  indicativeValuationLowerBound\n  indicativeValuationUpperBound\n  indicativeValuationMidpoint\n  indicativeValuationConfidence\n  indicativeValuationConfidenceComments\n  indicativeLiquidityAssessment\n  indicativeLiquidityAssessmentComments\n  indicativeValuationDate\n  indicativeValuationNotes\n  indicativeOfferDoc\n  vaCustomerNotes\n  vaPropertyNotes\n  questionsForRmToAskVendor\n  projectedNestedContractSignedDate\n  projectedEarlyPaymentDateFull\n  projectedEarlyPaymentDateTenPercent\n  reasonForFallOut\n  lostReasonExplanation\n  propertyVisitDate\n  checkedIdentity\n  checkedIdentityOwnerTwo\n  checkedProofOfAddress\n  discussedSolicitors\n  knownOnwardPurchaseValue\n  valueOfOnwardPurchase\n  discussedMortgageBrokers\n  portingMortgage\n  mortgageInPrincipleAlreadyObtained\n  mortgageProvider\n  discussedSoleAgency\n  majorPropertyDefectDetailsFromVisit\n  touchupWorkRequired\n  touchupWorkRecommendationDescription\n  localDevelopmentPlansDetails\n  anyRecentPlanningApplications\n  planningApplicationsDetails\n  obtainedCopyOfBuildingRegsControlSignOff\n  obtainedCopyOfPlanningPermissionsPartyWallAgreement\n  buildingWorksRecentlyUndertaken\n  recentBuildingWorksDetails\n  buildingWorksOutstanding\n  outstandingBuildingWorksDetails\n  leaseRestrictions\n  leaseRestrictionDetails\n  otherNotes\n  sinkingFund\n  sinkingFundDetails\n  managementAgents\n  siteVisitNotesSentToVa\n  finalRecommendedListingPrice\n  finalRecommendedListingPriceComments\n  finalValuation\n  finalValuationConfidence\n  finalLiquidityAssessment\n  finalLiquidityAssessmentComments\n  finalValuationDate\n  finalValuationNotes\n  guarantee\n  guaranteeValuationPercentage\n  agencyFeeIncVat\n  upsideShareIncVat\n  feeCapIncVat\n  oldFlatEarlyPaymentFee\n  referralDiscount\n  rebate\n  baseFee\n  incentiveFee\n  noDrawDiscount\n  earlyPaymentFeeFreePercent\n  earlyPaymentFeePerDay\n  referralDiscount\n  agreedToUseOurMortgageBrokers\n  sentDraftContract\n  discussedContract\n  sentFinalContract\n  homyzeBooked\n  worksAndCostsAgreed\n  worksNeeded\n  paidByNested\n  costsToBeReimbursedToNested\n  amlRisk\n  signedOffIdentity\n  signedOffIdentityOwnerTwo\n  signedOffProofOfAddress\n  passedSmartSearch\n  otherHighRiskChecks\n  checkedTitle\n  signedOffByAmlOfficer\n  solicitorFirm\n  leadSolicitor\n  solicitorPhoneNumber\n  solicitorEmail\n  mortgageBrokingFirm\n  leadBroker\n  mortgageBrokerPhoneNumber\n  mortgageBrokerEmail\n  photographerFloorplannerName\n  photographerFloorplannerPhone\n  photographerFloorplannerEmail\n  receivedAndOnGoogleDrive\n  surveyScheduled\n  surveyDate\n  surveyor\n  surveyorEmail\n  surveyorPhoneNumber\n  surveyIdentifiedMajorPropertyDefects\n  majorPropertyDefectDetailsFromSurvey\n  surveySharedWithVa\n  debtSignoffRequestedOfVa\n  handoverToAgency\n  solicitorIntroMade\n  mortgageBrokerIntroMade\n  __typename\n}\n\nfragment ValuationAnalystSection on NestDeal {\n  nestedValuer\n  whyNested\n  customerPriceExpectations\n  customerNeed\n  customerNotes\n  currentListingUrl\n  address\n  propertySubType\n  floorPositionsOccupied\n  condition\n  tenure\n  leaseRemaining\n  isLeaseExtendable\n  groundRent\n  serviceCharge\n  doubleBedrooms\n  singleBedrooms\n  bathrooms\n  wcs\n  floorAreaTotal\n  outsideSpace\n  renovated\n  investment\n  obtainedPlanningPermission\n  renovationSummary\n  parkingAccess\n  occupancy\n  endOfTenancyUserSubmitted\n  tenancyEndDate\n  propertyIssues\n  propertyIssuesDetails\n  aboveRetail\n  additionalDetails\n  propertyNotes\n  previousSalePriceOne\n  previousSaleDateOne\n  currentListingPrice\n  currentListingDate\n  currentListingAgent\n  currentListingUrl\n  offerPriceOne\n  offerDateOne\n  offerPriceTwo\n  offerDateTwo\n  offerPriceThree\n  offerDateThree\n  sellerValuation\n  indexedValuationFromPreviousSale\n  qualificationValuationLowerBound\n  qualificationValuationUpperBound\n  qualificationValuationMidpoint\n  floorAreaHabitable\n  outdoorSpaceArea\n  thresholdGuaranteeAmount\n  guaranteeAmountComments\n  thresholdLeaseLength\n  leaseLengthComments\n  thresholdVacantPossession\n  vacantPossessionComments\n  compromiseDistanceToStation\n  proximityToTransportLinksComments\n  compromiseLocalSchoolQuality\n  schoolCatchmentsComments\n  compromiseMajorDevelopmentNearby\n  nearbyMajorDevelopmentsComments\n  compromiseOnABusyRoad\n  roadQualityComments\n  compromiseCloseToRailLine\n  proximityToRailTracksComments\n  compromiseAboveRetailCommercial\n  adjacentBuildingComments\n  compromiseExLocalAuthority\n  propertyTypeComments\n  compromiseHighServiceCharge\n  tenureComments\n  compromiseSignificantPropertyQualityIssue\n  majorPropertyIssueComments\n  compromiseTopFloorWithNoLift\n  floorPositionComments\n  compromiseOddLayout\n  internalLayoutComments\n  compromiseNeedsRefurbishment\n  internalConditionComments\n  compromiseLackOfLight\n  internalLightComments\n  compromiseRestrictedCeilingHeight\n  ceilingHeightComments\n  compromiseNoOutsideSpace\n  outsideSpaceComments\n  compromiseNoParking\n  parkingComments\n  compromiseMortgageabilityIssue\n  mortgageabilityIssueComments\n  valuationPastSaleComparablesConfidence\n  pastSaleComparablesComments\n  valuationSaleAgreedComparablesConfidence\n  saleAgreedComparablesComments\n  valuationExpectedBuyerSet\n  expectedBuyerSetComments\n  valuationRentalYieldAtValuation\n  rentalYieldAtValuationComments\n  valuationAmountOfCompetition\n  amountOfCompetitionComments\n  thirdPartyOpinion\n  thirdPartyOpinionComments\n  valuationCurrentAreaGrowth\n  currentAreaGrowthComments\n  valuationSaleAgreedAvailableRatioConfidence\n  liquidityRatiosComments\n  uniquePropertyLimitingBuyerSet\n  uniquePropertyLimitingBuyerSetComments\n  valuerCustomerQuality\n  valuerPropertyQuality\n  valuerAreaQuality\n  valuerOverallQuality\n  indicativeListingPrice\n  indicativeValuationLowerBound\n  indicativeValuationUpperBound\n  indicativeValuationMidpoint\n  indicativeValuationConfidence\n  indicativeValuationConfidenceComments\n  indicativeLiquidityAssessment\n  indicativeLiquidityAssessmentComments\n  indicativeValuationDate\n  indicativeValuationNotes\n  closeIoOpportunityStatusId\n  indicativeOfferDoc\n  customerNotes\n  vaCustomerNotes\n  propertyNotes\n  vaPropertyNotes\n  questionsForRmToAskVendor\n  reasonForNoGuaranteeOffered\n  addedSdaCallTaskInCloseio\n  finalRecommendedListingPrice\n  finalRecommendedListingPriceComments\n  finalValuation\n  finalValuationConfidence\n  finalLiquidityAssessment\n  finalLiquidityAssessmentComments\n  finalValuationDate\n  finalValuationNotes\n  finalOfferSignoffBy\n  finalOfferDoc\n  reasonForNoGuaranteeOffered\n  surveyIdentifiedMajorPropertyDefects\n  majorPropertyDefectDetailsFromSurvey\n  compromiseSignificantPropertyQualityIssue\n  majorPropertyIssueComments\n  debtSignedOff\n  __typename\n}\n\nfragment AgencySection on NestDeal {\n  nestedVendorManager\n  epc\n  keyCollected\n  installKeySafe\n  solicitorIntroMade\n  mortgageBrokerIntroMade\n  prepareListing\n  originalListDate\n  nestedForSaleBoardAllowed\n  askIfWeCanDoATestimonialAtEndOfProcess\n  borough\n  councilTaxBand\n  stampDutyAtListPrice\n  trainStationOne\n  walkToStationOneMins\n  trainStationTwo\n  walkToStationTwoMins\n  primarySchoolNameOne\n  primarySchoolDistanceMilesOne\n  primarySchoolOfstedRatingOne\n  primarySchoolNameTwo\n  primarySchoolDistanceMilesTwo\n  primarySchoolOfstedRatingTwo\n  secondarySchoolNameOne\n  secondarySchoolDistanceMilesOne\n  secondarySchoolOfstedRatingOne\n  secondarySchoolNameTwo\n  secondarySchoolDistanceMilesTwo\n  secondarySchoolOfstedRatingTwo\n  listedBuilding\n  conservationArea\n  agencyConfidence\n  currentExpectedPrice\n  worstCaseValuation\n  nestedListing\n  rightmoveViewsInFirstWeek\n  originalPrice\n  originalListDate\n  secondListingPrice\n  secondListingDate\n  thirdListingPrice\n  thirdListingDate\n  fourthListingPrice\n  fourthListingDate\n  acceptedOfferAmount\n  acceptedOfferDate\n  nestedOfferOne\n  nestedOfferDateOne\n  nestedOfferTwo\n  nestedOfferDateTwo\n  nestedOfferThree\n  nestedOfferDateThree\n  nestedOfferFour\n  nestedOfferDateFour\n  actualSalePrice\n  depositPaid\n  amountPaid\n  isUsingAgent\n  agentBranch\n  agentContact\n  splitFeeToPayPercentageIncVat\n  offerAcceptedThroughAgent\n  guaranteeCurrentStatus\n  sellerReturnedAllForms\n  managingAgentContacted\n  managingAgentFeePaid\n  leaseholdPackReturned\n  projectedDateOfExchange\n  projectedDateOfCompletion\n  actualDateOfExchange\n  actualDateOfCompletion\n  householdCostsToBeReimbursedToVendor\n  descrptionOfHouseholdCostsToBeReimbursed\n  __typename\n}\n\nfragment QualificationSection on NestDeal {\n  nestedQualifier\n  name\n  secondOwnerName\n  source\n  partnerReferral\n  partnerDetails\n  howNestedCanHelp\n  urgency\n  scheduleCall\n  nestimateRangeFirst\n  nestimateRangeLast\n  avmValuation\n  sellerValuation\n  zooplaValuation\n  indexedValuationFromPreviousSale\n  address\n  propertyType\n  tenure\n  leaseRemaining\n  isLeaseExtendable\n  groundRent\n  serviceCharge\n  beds\n  bathrooms\n  floorAreaUserSubmitted\n  outsideSpace\n  renovated\n  investment\n  obtainedPlanningPermission\n  renovationSummary\n  parkingAccess\n  occupancy\n  endOfTenancyUserSubmitted\n  propertyIssues\n  propertyIssuesDetails\n  aboveRetail\n  additionalDetails\n  recentlyMarketed\n  recentMarketingDetails\n  currentListingPrice\n  currentListingDate\n  currentListingAgent\n  currentListingUrl\n  previousSalePriceOne\n  previousSaleDateOne\n  propertySubType\n  floorPositionsOccupied\n  condition\n  doubleBedrooms\n  singleBedrooms\n  bathrooms\n  wcs\n  floorAreaTotal\n  hasPhotos\n  informationFloorplan\n  sellerValuation\n  currentListingPrice\n  currentListingDate\n  previousSalePriceOne\n  previousSaleDateOne\n  soldComparable\n  forSaleComparable\n  liquiditySummary\n  positives\n  compromises\n  streetViewCheck\n  qualificationValuationLowerBound\n  qualificationValuationUpperBound\n  qualificationValuationMidpoint\n  customerNotes\n  propertyNotes\n  offerPriceOne\n  offerDateOne\n  offerPriceTwo\n  offerDateTwo\n  offerPriceThree\n  offerDateThree\n  tenancyEndDate\n  whyNested\n  customerPriceExpectations\n  customerNeed\n  qualifierCustomerQuality\n  qualifierPropertyQuality\n  qualifierAreaQuality\n  qualifierOverallQuality\n  closeIoOpportunityStatusId\n  scheduledValuationDate\n  addedVaValuationTaskInCloseio\n  nestedRelationshipManager\n  addRmCallTaskInCloseio\n  scheduleRmCallInCalendar\n  sendConfirmationEmailToCustomer\n  reasonForNoGuaranteeOffered\n  lostReasonExplanation\n  sendFollowupEmailToNonQualifiedCustomer\n  futureFollowupScheduled\n  closeIoLeadStatusId\n  __typename\n}\n\nfragment ProgressionSection on NestDeal {\n  guaranteeCurrentStatus\n  sentLoanAgreement\n  sentOptionAgreement\n  sentPoa\n  verifiedBankAccount\n  actualEarlyPaymentDateFull\n  actualEarlyPaymentDateTenPercent\n  actualPostNinetyDayPaymentDate\n  __typename\n}\n","variables":{"id":"9"},"operationName":null}
mitchellhenke commented 6 years ago

Sentry suggested trying marking the query field as "safe" in your project settings, or disabling the default data scrubbers, pictured here:

image

samsondav commented 6 years ago

OK! I will try that, thanks.

mitchellhenke commented 6 years ago

@samphilipd did that solve the problem?

samsondav commented 6 years ago

@mitchellhenke Yes that fixed it! Thank you for all your help ❤️ 💛 💙 💚 💜

mitchellhenke commented 6 years ago

@samphilipd awesome, thank you for your help in solving it!